COIN-OR::LEMON - Graph Library

Changeset 106:853dd852abc7 in glemon-0.x for algobox.h


Ignore:
Timestamp:
01/04/06 19:05:55 (18 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2451
Message:

Communication with algorithm window is developed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • algobox.h

    r103 r106  
    1212class AlgoBox : public Gtk::VBox
    1313{
     14  sigc::signal<void, std::string> signal_maplist_need; 
    1415 
     16  Gtk::ComboBoxText tabcbt;
     17
     18protected:
    1519  Gtk::Label * label;
    16   Gtk::ComboBoxText cbt;
     20  std::vector<Gtk::ComboBoxText *> nodemapcbts;
     21  std::vector<Gtk::ComboBoxText *> edgemapcbts;
    1722 
    18  public:
    19   AlgoBox(std::vector<std::string> tabnames)
    20     {
    21       update_tablist(tabnames);
     23public:
     24  AlgoBox(){};
     25  AlgoBox(std::vector<std::string>, std::vector<std::string>, std::vector<std::string>);
    2226
    23       label=new Gtk::Label("Haliho");
    24      
    25       pack_start(*label);
    26       pack_start(cbt);
     27  virtual void init(std::vector<std::string>, std::vector<std::string>, std::vector<std::string>);
    2728
    28       show_all_children();
    29     };
     29  sigc::signal<void, std::string> signal_maplist_needed(); 
     30  void emit_tab_change();
    3031
    31   void update_tablist( std::vector< std::string > tl )
    32     {
    33       std::string actname=cbt.get_active_text();
    34       int prev_act=-1;
     32  void update_tablist( std::vector< std::string > tl );
     33  void update_maplist( std::vector< std::string >, std::vector< std::string >);
    3534
    36       cbt.clear();
    37       int actptr=0;
    38 
    39       std::vector< std::string >::iterator emsi=tl.begin();
    40       for(;emsi!=tl.end();emsi++)
    41         {
    42           if(actname==*emsi)
    43             {
    44               prev_act=actptr;
    45             }
    46 
    47           cbt.append_text(*emsi);
    48           actptr++;
    49         }
    50 
    51       if(prev_act!=-1)
    52         {
    53           cbt.set_active(prev_act);
    54         }
    55       else if(actptr>0) //so there is item in the list
    56         {
    57           cbt.set_active(0);
    58         }
    59     }
    60 
     35  void update_cbt( std::vector< std::string > tl, Gtk::ComboBoxText &);
     36 
     37  virtual void run();
     38 
     39  virtual void build_box();
    6140};
    6241#endif //ALGOBOX_H
Note: See TracChangeset for help on using the changeset viewer.