当前位置: 首页 > 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.dt0577.cn/news/57538.html

相关文章:

  • 开发网站公司推荐seo快速排名是什么
  • web个人网页模板秦皇岛seo优化
  • 做网站怎么投放广告怎么做优化
  • 自己开公司 自己做网站推广价格一般多少
  • 高端大气网站欣赏百度人工智能
  • 网站建设技术购物网站
  • 别墅效果图网站在线制作网页网站
  • 时时彩做号网站教育培训机构平台
  • 福田祥菱十大seo免费软件
  • 河北网站推广优化深圳网络推广
  • 做网站费用会计分录怎么做专业seo网络推广
  • 网站策划方案目标重庆排名优化整站优化
  • 建一个个人网站一年多少钱北京cms建站模板
  • 青岛的网站建设徐州seo排名公司
  • 贵司不断优化网站建设网推拉新app推广平台
  • 潍坊建设网站公司电话吴中seo页面优化推广
  • 啥前端框架可以做网站首页太原seo计费管理
  • 做燕鲍翅的网站网络推广外包怎么样
  • 天津网站优化公司哪家专业雅虎搜索引擎首页
  • 黔南网站建设十堰seo排名公司
  • 成人本科要读几年济宁seo公司
  • 河北正规网站建设比较产品软文撰写
  • 电商网站设计与制作青岛网站制作公司
  • 网站b站最好看的纪录片软件女生做sem专员的工作难吗
  • 临沂网站建设求职简历免费下载百度seo
  • 百度建立企业网站建设的目的精准粉丝引流推广
  • 专业网站开发多少钱百度竞价防软件点击软件
  • icp对网站内容百度提交收录入口
  • 东莞公司品牌网站建设网址ip地址查询工具
  • 在企业网站建设的解决方案中如何写好软文推广