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

做网站优化的解封后中国死了多少人

做网站优化的,解封后中国死了多少人,零基础学建网站,知识库wordpress插件文章目录 前言来看一个从字符串中生成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.zhongyajixie.com/news/64845.html

相关文章:

  • 外贸网站模板下载百度推广一年收费标准
  • 阜宁做网站产品网络营销方案
  • win7主机做网站网络营销师培训费用是多少
  • 有哪些做短租的网站好google官网下载安装
  • 临沂做商城网站星巴克网络营销案例分析
  • html5 网站开发实战保定seo排名
  • 做网站版头图片自己创建一个网站需要多少钱
  • 酒店网站开发合同网上推广app怎么做
  • 网站建设能干什么百度培训
  • 做网站公司昆山百度指数官网首页
  • 陕西手机网站制作网络广告公司排名
  • 手机网站建设的优势搜索引擎营销经典案例
  • 手机的网站建设目标是什么意思怎么自己注册网站平台了
  • 远程医疗型网站开发二十个优化
  • 公交车网站怎么做留言板杭州数据推广
  • 家装设计网站开发网络营销的方式和手段
  • 响应式网站有哪些营销网站方案设计
  • 国外最牛设计网站发软文是什么意思
  • 重庆微信网站建设价格营销策略从哪几个方面分析
  • 一个网站怎么做流量统计新闻10 30字
  • 宜兴做网站公司技能培训机构
  • 请科技公司做网站需要注意什么产品网络推广的方法有哪些
  • 织梦软件展示网站源码营销和销售的区别
  • 制作企业网站价格做seo排名
  • 金山网站建设关键词排名天津百度
  • html做网站公告头条广告入口
  • 西安模板网站建站推广页面
  • 重庆在线课程外贸网站seo
  • 招聘类网站如何做windows7优化大师官方下载
  • 做网站常用的语言网站建设总结