当前位置: 首页 > 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.mmbaike.com/news/73186.html

相关文章:

  • 北京市中交建设有限公司网站长春网站公司哪家好
  • 个人网站icp备案网经典软文案例或软文案例
  • 潍坊网站建设服务怎么做公众号
  • 品牌网站设计地址李勇seo博客
  • 做php网站前端价格国家职业技能培训学校
  • 网站开发技术的发展流程十大免费cms建站系统介绍
  • 设计比较好的政府网站哪个平台可以接推广任务
  • 电子商务网站建设的过程和步骤seo排名关键词搜索结果
  • 图片素材网站哪个最多视频号下载器手机版
  • 工商银行建设银行招商银行网站怎么做自媒体
  • 网站注意事项哪里有免费的网站推广软件
  • 口碑好的网站建设平台沈阳seo顾问
  • 营销策划书范文案例seo信息查询
  • 如何做网站网页免费南阳网站优化公司
  • 网站设计师培训图片短视频seo优化排名
  • WordPress添加内容评论可见一键优化清理
  • 党校网站建设集客营销软件
  • 使用webp的网站每日英语新闻
  • png图片可以做网站图标吗百度人工服务24小时
  • 做国外网站销售百度官网下载安装
  • 学习完成网站建设作业东莞网站推广行者seo08
  • 网站开发的实践报告网络营销策划方案800字
  • 色块网站设计windows清理优化大师
  • 科技企业网站源码线上平台推广方案
  • 成都建设项目环境影响登记网站百度爱采购官方网站
  • 微信小程序怎么做店铺免费广州营销优化
  • 淘宝优惠劵做网站模版seo优化几个关键词
  • 网站制作成品百度关键词多少钱一个月
  • 网页版百度优化公司网站排名
  • 做淘客需要网站西安外包网络推广