gui/edit_win.cc
changeset 1545 e8378402f97e
parent 1494 ae55ba000ebb
equal deleted inserted replaced
3:3e57f9f5747d 4:2b5a22917d45
     1 #include <edit_win.h>
     1 #include <edit_win.h>
     2 #include <set>
     2 #include <set>
     3 
     3 
     4 bool EditWin::close_if_escape_is_pressed(GdkEventKey* e)
     4 bool EditWin::closeIfEscapeIsPressed(GdkEventKey* e)
     5 {
     5 {
     6   if(e->keyval==GDK_Escape)
     6   if(e->keyval==GDK_Escape)
     7   {
     7   {
     8     hide();
     8     hide();
     9   }
     9   }
    13 EditWin::EditWin(const std::string& title, GraphDisplayerCanvas & grdispc):gdc(grdispc),table(2, 2, true)
    13 EditWin::EditWin(const std::string& title, GraphDisplayerCanvas & grdispc):gdc(grdispc),table(2, 2, true)
    14 {
    14 {
    15   set_title(title);
    15   set_title(title);
    16   set_default_size(200, 50);
    16   set_default_size(200, 50);
    17   set_keep_above(true);
    17   set_keep_above(true);
    18   signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::close_if_escape_is_pressed));
    18   signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::closeIfEscapeIsPressed));
    19   
    19   
    20   //buttons array
    20   //buttons array
    21   buttons=new Gtk::RadioButton * [TOOL_NUM];
    21   buttons=new Gtk::RadioButton * [TOOL_NUM];
    22   for(int i=0;i<TOOL_NUM;i++)
    22   for(int i=0;i<TOOL_NUM;i++)
    23     {
    23     {