gui/main_win.cc
changeset 1790 c7dd9d8c770a
parent 1733 5e0d97823ba2
child 1823 cb082cdf3667
equal deleted inserted replaced
21:0a7e0c2a86bb 22:a38ab2833ea8
   125 
   125 
   126   uim=Gtk::UIManager::create();
   126   uim=Gtk::UIManager::create();
   127   uim->insert_action_group(ag);
   127   uim->insert_action_group(ag);
   128   add_accel_group(uim->get_accel_group());
   128   add_accel_group(uim->get_accel_group());
   129 
   129 
   130   /*
       
   131       "      <menuitem action='ViewZoomFit' />"
       
   132       "    <toolitem action='ViewZoomFit' />"
       
   133    */
       
   134 
       
   135   try
   130   try
   136   {
   131   {
   137 
   132 
   138     Glib::ustring ui_info =
   133     Glib::ustring ui_info =
   139       "<ui>"
   134       "<ui>"
   148       "    </menu>"
   143       "    </menu>"
   149       "    <menu action='ViewMenu'>"
   144       "    <menu action='ViewMenu'>"
   150       "      <menuitem action='ViewZoomIn' />"
   145       "      <menuitem action='ViewZoomIn' />"
   151       "      <menuitem action='ViewZoomOut' />"
   146       "      <menuitem action='ViewZoomOut' />"
   152       "      <menuitem action='ViewZoom100' />"
   147       "      <menuitem action='ViewZoom100' />"
       
   148       "      <menuitem action='ViewZoomFit' />"
   153       "    </menu>"
   149       "    </menu>"
   154       "    <menu action='ShowMenu'>"
   150       "    <menu action='ShowMenu'>"
   155       "      <menuitem action='ShowMaps'/>"
   151       "      <menuitem action='ShowMaps'/>"
   156       "    </menu>"
   152       "    </menu>"
   157       "  </menubar>"
   153       "  </menubar>"
   162       "    <toolitem action='Close' />"
   158       "    <toolitem action='Close' />"
   163       "    <separator />"
   159       "    <separator />"
   164       "    <toolitem action='ViewZoomIn' />"
   160       "    <toolitem action='ViewZoomIn' />"
   165       "    <toolitem action='ViewZoomOut' />"
   161       "    <toolitem action='ViewZoomOut' />"
   166       "    <toolitem action='ViewZoom100' />"
   162       "    <toolitem action='ViewZoom100' />"
       
   163       "    <toolitem action='ViewZoomFit' />"
   167       "    <separator />"
   164       "    <separator />"
   168       "    <toolitem action='MoveItem' />"
   165       "    <toolitem action='MoveItem' />"
   169       "    <toolitem action='CreateNode' />"
   166       "    <toolitem action='CreateNode' />"
   170       "    <toolitem action='CreateEdge' />"
   167       "    <toolitem action='CreateEdge' />"
   171       "    <toolitem action='EraseItem' />"
   168       "    <toolitem action='EraseItem' />"
   195     static_cast<Gtk::Toolbar*>(toolbar)->set_toolbar_style(Gtk::TOOLBAR_ICONS);
   192     static_cast<Gtk::Toolbar*>(toolbar)->set_toolbar_style(Gtk::TOOLBAR_ICONS);
   196     vbox.pack_start(*toolbar, Gtk::PACK_SHRINK);
   193     vbox.pack_start(*toolbar, Gtk::PACK_SHRINK);
   197   }
   194   }
   198 
   195 
   199   Gtk::ScrolledWindow* pScrolledWindow = manage(new Gtk::ScrolledWindow());
   196   Gtk::ScrolledWindow* pScrolledWindow = manage(new Gtk::ScrolledWindow());
       
   197   pScrolledWindow->set_shadow_type(Gtk::SHADOW_IN);
   200   pScrolledWindow->add(gd_canvas);
   198   pScrolledWindow->add(gd_canvas);
   201   vbox.pack_start(*pScrolledWindow);
   199   vbox.pack_start(*pScrolledWindow);
   202 
   200 
   203   tooltips.set_tip(*(uim->get_widget("/ToolBar/CreateNode")),"Create Node");
   201   tooltips.set_tip(*(uim->get_widget("/ToolBar/CreateNode")),"Create Node");
   204   tooltips.enable();
   202   tooltips.enable();