[Lemon-commits] [lemon_svn] hegyi: r2457 - hugo/trunk/gui

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:52:49 CET 2006


Author: hegyi
Date: Fri Jan  6 15:36:46 2006
New Revision: 2457

Added:
   hugo/trunk/gui/mapselector.cc
      - copied, changed from r2455, /hugo/trunk/gui/mw-mapselector.cc
Removed:
   hugo/trunk/gui/mw-mapselector.cc
Modified:
   hugo/trunk/gui/Makefile.am
   hugo/trunk/gui/map_win.h

Log:
MapSelector has become a standalone class.

Modified: hugo/trunk/gui/Makefile.am
==============================================================================
--- hugo/trunk/gui/Makefile.am	(original)
+++ hugo/trunk/gui/Makefile.am	Fri Jan  6 15:36:46 2006
@@ -27,7 +27,8 @@
 	mapstorage.h \
 	map_win.cc \
 	map_win.h \
-	mw-mapselector.cc \
+	mapselector.cc \
+	mapselector.h \
 	nbtab.h \
 	nbtab.cc \
 	new_map_win.cc \

Modified: hugo/trunk/gui/map_win.h
==============================================================================
--- hugo/trunk/gui/map_win.h	(original)
+++ hugo/trunk/gui/map_win.h	Fri Jan  6 15:36:46 2006
@@ -7,6 +7,7 @@
 
 #include <all_include.h>
 #include <nbtab.h>
+#include <mapselector.h>
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
 
@@ -15,55 +16,6 @@
 ///assigned to maps.
 class MapWin : public Gtk::Window
 {
-
-  class MapSelector : public Gtk::HBox
-  {
-  protected:
-    sigc::signal<void, std::string> signal_cbt;
-    sigc::signal<void, bool> signal_newmapwin;
-
-    int id;
-
-    bool itisedge;
-
-    bool default_state;
-
-    bool set_new_map;
-
-    Gtk::ComboBoxText cbt;
-
-    Gtk::Button * newbut, * defbut;
-
-    Gtk::HBox hbox;
-
-    Gtk::Label * label;
-
-  public:
-
-    MapSelector(std::vector<std::string>, std::string, int, bool);
-
-    sigc::signal<void, std::string> signal_cbt_ch();
-    sigc::signal<void, bool> signal_newmapwin_needed();
-
-    void update_list( std::vector<std::string> );
-
-    ///If a radiobutton is clicked, this function determines
-    ///which button was that and after that calls the
-    ///appropriate function of the \ref GraphDisplayerCanvas
-    ///to change the visible values of that attribute.
-    virtual void comboChanged();
-
-    virtual void new_but_pressed();
-
-    virtual void reset();
-
-    Glib::ustring get_active_text();
-    void set_active_text(Glib::ustring);
-    void append_text(Glib::ustring);
-  };
-
-
-
 protected:
   NoteBookTab & mytab;
 

Copied: hugo/trunk/gui/mapselector.cc (from r2455, /hugo/trunk/gui/mw-mapselector.cc)
==============================================================================
--- /hugo/trunk/gui/mw-mapselector.cc	(original)
+++ hugo/trunk/gui/mapselector.cc	Fri Jan  6 15:36:46 2006
@@ -1,6 +1,6 @@
-#include "map_win.h"
+#include "mapselector.h"
 
-MapWin::MapSelector::MapSelector(std::vector<std::string> ml, std::string act, int identifier, bool edge):id(identifier),itisedge(edge),set_new_map(false)
+MapSelector::MapSelector(std::vector<std::string> ml, std::string act, int identifier, bool edge):id(identifier),itisedge(edge),set_new_map(false)
 {
   update_list(ml);
 
@@ -18,7 +18,7 @@
   //binding signal to the actual entry
   cbt.signal_changed().connect
     (
-     sigc::mem_fun((*this), &MapWin::MapSelector::comboChanged),
+     sigc::mem_fun((*this), &MapSelector::comboChanged),
      false
      );
   
@@ -38,14 +38,14 @@
 
   defbut->signal_pressed().connect
     (
-     sigc::mem_fun(*this, &MapWin::MapSelector::reset)
+     sigc::mem_fun(*this, &MapSelector::reset)
      );
 
   newbut=new Gtk::Button(Gtk::Stock::NEW);
 
   newbut->signal_pressed().connect
     (
-     sigc::mem_fun(*this, &MapWin::MapSelector::new_but_pressed)
+     sigc::mem_fun(*this, &MapSelector::new_but_pressed)
      );
 
   add(*label);
@@ -56,13 +56,13 @@
   add(*newbut);
 }
 
-void MapWin::MapSelector::new_but_pressed()
+void MapSelector::new_but_pressed()
 {
   set_new_map=true;
   signal_newmapwin.emit(itisedge);
 }
 
-void MapWin::MapSelector::update_list( std::vector< std::string > ml )
+void MapSelector::update_list( std::vector< std::string > ml )
 {
   int prev_act=cbt.get_active_row_number();
   cbt.clear();
@@ -78,7 +78,7 @@
     }
 }
 
-void MapWin::MapSelector::comboChanged()
+void MapSelector::comboChanged()
 {
   if(cbt.get_active_row_number()!=0)
     {
@@ -95,7 +95,7 @@
     }
 }
 
-void MapWin::MapSelector::reset()
+void MapSelector::reset()
 {
   default_state=true;
 
@@ -105,17 +105,17 @@
 }
 
 
-Glib::ustring MapWin::MapSelector::get_active_text()
+Glib::ustring MapSelector::get_active_text()
 {
   return cbt.get_active_text();
 }
 
-void MapWin::MapSelector::set_active_text(Glib::ustring text)
+void MapSelector::set_active_text(Glib::ustring text)
 {
   cbt.set_active_text(text);
 }
 
-void MapWin::MapSelector::append_text(Glib::ustring text)
+void MapSelector::append_text(Glib::ustring text)
 {
   cbt.append_text(text);
   if(set_new_map)
@@ -125,12 +125,12 @@
     }
 }
 
-sigc::signal<void, std::string> MapWin::MapSelector::signal_cbt_ch()
+sigc::signal<void, std::string> MapSelector::signal_cbt_ch()
 {
   return signal_cbt;
 }
 
-sigc::signal<void, bool> MapWin::MapSelector::signal_newmapwin_needed()
+sigc::signal<void, bool> MapSelector::signal_newmapwin_needed()
 {
   return signal_newmapwin;
 }



More information about the Lemon-commits mailing list