当前位置: 首页 > news >正文

做网站优化的营销公司网站

做网站优化的,营销公司网站,手机网站建设好吗,做产地证的网站文章目录 前言来看一个从字符串中生成UI的例子 前言 glade生成的xml格式不被gtkmm4支持, 需要作修改 来看一个从字符串中生成UI的例子 #include <gtkmm/application.h> #include <gtkmm.h> #include <iostream> using namespace std;class ExampleWindow :…

文章目录

  • 前言
  • 来看一个从字符串中生成UI的例子

前言

  • glade生成的xml格式不被gtkmm4支持, 需要作修改

来看一个从字符串中生成UI的例子

  • #include <gtkmm/application.h>
    #include <gtkmm.h>
    #include <iostream>
    using namespace std;class ExampleWindow : public Gtk::Window
    {
    public:ExampleWindow();virtual ~ExampleWindow() {};void on_action_file_new(){cout << "New" << endl;};void on_action_file_open() {};void on_action_file_quit() {};Gtk::Box m_Box;
    };
    ExampleWindow::ExampleWindow()
    {auto m_refBuilder = Gtk::Builder::create();Glib::ustring ui_info ="<interface>""  <menu id='menubar'>""    <submenu>""      <attribute name='label' translatable='yes'>_File</attribute>""      <section>""        <item>""          <attribute name='label' translatable='yes'>_New</attribute>""          <attribute name='action'>example.new</attribute>""        </item>""      </section>""      <section>""        <item>""          <attribute name='label' translatable='yes'>_Quit</attribute>""          <attribute name='action'>example.quit</attribute>""        </item>""      </section>""    </submenu>""    <submenu>""      <attribute name='label' translatable='yes'>_Edit</attribute>""      <item>""        <attribute name='label' translatable='yes'>_Copy</attribute>""        <attribute name='action'>example.copy</attribute>""      </item>""      <item>""        <attribute name='label' translatable='yes'>_Paste</attribute>""        <attribute name='action'>example.paste</attribute>""      </item>""    </submenu>""  </menu>""</interface>";//绑定行动的对应动作 实际绑定auto m_refActionGroup = Gio::SimpleActionGroup::create();m_refActionGroup->add_action("new", sigc::mem_fun(*this, &ExampleWindow::on_action_file_new));m_refActionGroup->add_action("open", sigc::mem_fun(*this, &ExampleWindow::on_action_file_open));m_refActionGroup->add_action("quit", sigc::mem_fun(*this, &ExampleWindow::on_action_file_quit));insert_action_group("example", m_refActionGroup);//行动组example 实体诞生m_refBuilder->add_from_string(ui_info);//m_refBuilder->add_from_file("K:\\CPlusPlus\\cgcc\\Xml_UI.xml");auto gmenu = m_refBuilder->get_object<Gio::Menu>("menubar");auto pMenuBar = Gtk::make_managed<Gtk::PopoverMenuBar>(gmenu);m_Box.append(*pMenuBar);set_child(m_Box);pMenuBar->set_visible(true);m_Box.set_visible(true);
    }
    int main(int argc, char* argv[])
    {auto app = Gtk::Application::create("org.gtkmm.example");//app快捷键 键位设置对应行动 预先设置app->set_accel_for_action("example.new", "<Primary>n");//表示Ctrl+Napp->set_accel_for_action("example.quit", "<Primary>q");//表示Ctrl+Qapp->set_accel_for_action("example.copy", "<Primary>c");//表示Ctrl+Capp->set_accel_for_action("example.paste", "<Primary>v");//表示Ctrl+V//Shows the window and returns when it is closed.return app->make_window_and_run<ExampleWindow>(argc, argv);
    }
    
    可以把那些字符串放入一个xml文件
    image
    然后
    m_refBuilder->add_from_file(“K:\CPlusPlus\cgcc\Xml_UI.xml”);
    代替上面的add_from_string.
http://www.yidumall.com/news/17177.html

相关文章:

  • 新媒体网站建设优化推广联盟
  • 服务器网站跳转怎么做山东做网站公司
  • 翼讯自助网站石首seo排名
  • 湘西做网站现在感染症状有哪些
  • 合肥网站建设托管怎么做产品推广和宣传
  • 响应式网站能用dw做吗信息流投放平台
  • 中铁建设集团有限公司官方网站怎样推广自己的商城
  • 免费网页托管郑州seo管理
  • 徐州做网站xlec百度搜索推广收费标准
  • wordpress 免费电商主题广州seo关键词优化费用
  • uc做购物网站千瓜数据
  • 广州网站设计工作室职业培训机构需要什么资质
  • 网站免费观影怎么做百度推广员工工资怎么样
  • 西宁做网站_君博示范谷歌外贸平台推广需要多少钱
  • 现在做一个网站系统多少钱网络营销策略实施的步骤
  • 建网站当老板网页模板代码
  • 济南城乡住房建设厅网站企业建站系统
  • 太原网站建设制作报价百度指数免费添加
  • 115做网站今日重大新闻头条
  • 网页设计图片修改后是否可以商用seo整站优化公司持续监控
  • 网站源码怎么做网站网页推广方案
  • 手机网站整站源码网站免费建站app
  • 秦皇岛网站制作报价凡科建站小程序
  • 天元建设集团有限公司天眼查信阳seo
  • 网站怎么做图片动态搜索引擎优化方法有哪几种
  • 同城型网站开发网络推广员岗位职责
  • 昆山网站设计哪家好成人短期电脑培训班学费
  • 比较好的网站建设公司推广赚钱平台有哪些
  • 新疆建设工程信息服务平台五年级下册数学优化设计答案
  • 做网站的功能结构布局山东工艺美术学院网站建设公司