diff -r 9e78d14fd0ba -r 853dd852abc7 algobox.h --- a/algobox.h Wed Jan 04 13:31:59 2006 +0000 +++ b/algobox.h Wed Jan 04 18:05:55 2006 +0000 @@ -11,52 +11,31 @@ class AlgoBox : public Gtk::VBox { + sigc::signal signal_maplist_need; + Gtk::ComboBoxText tabcbt; + +protected: Gtk::Label * label; - Gtk::ComboBoxText cbt; + std::vector nodemapcbts; + std::vector edgemapcbts; - public: - AlgoBox(std::vector tabnames) - { - update_tablist(tabnames); +public: + AlgoBox(){}; + AlgoBox(std::vector, std::vector, std::vector); - label=new Gtk::Label("Haliho"); - - pack_start(*label); - pack_start(cbt); + virtual void init(std::vector, std::vector, std::vector); - show_all_children(); - }; + sigc::signal signal_maplist_needed(); + void emit_tab_change(); - void update_tablist( std::vector< std::string > tl ) - { - std::string actname=cbt.get_active_text(); - int prev_act=-1; + void update_tablist( std::vector< std::string > tl ); + void update_maplist( std::vector< std::string >, std::vector< std::string >); - cbt.clear(); - int actptr=0; - - std::vector< std::string >::iterator emsi=tl.begin(); - for(;emsi!=tl.end();emsi++) - { - if(actname==*emsi) - { - prev_act=actptr; - } - - cbt.append_text(*emsi); - actptr++; - } - - if(prev_act!=-1) - { - cbt.set_active(prev_act); - } - else if(actptr>0) //so there is item in the list - { - cbt.set_active(0); - } - } - + void update_cbt( std::vector< std::string > tl, Gtk::ComboBoxText &); + + virtual void run(); + + virtual void build_box(); }; #endif //ALGOBOX_H