COIN-OR::LEMON - Graph Library

Changeset 121:637c12cbd64c in glemon-0.x


Ignore:
Timestamp:
01/12/06 14:28:54 (18 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2466
Message:

Documentation of NoteBookTab?. Redundant function parameters are removed from other classes as well.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • map_win.cc

    r114 r121  
    3030
    3131    e_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::edgeMapChanged), i));
    32     e_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i));
     32    e_combo_array[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &MapWin::newMapWinNeeded));
    3333  }
    3434
     
    5050
    5151    n_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::nodeMapChanged), i));
    52     n_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i));
     52    n_combo_array[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &MapWin::newMapWinNeeded));
    5353  }
    5454
     
    7777}
    7878
    79 void MapWin::newMapWinNeeded(bool itisedge, int prop)
     79void MapWin::newMapWinNeeded(bool itisedge)
    8080{
    81   mytab.popupNewMapWin(itisedge, prop);
     81  mytab.popupNewMapWin(itisedge);
    8282}
    8383
  • map_win.h

    r112 r121  
    4040  void edgeMapChanged(std::string, int);
    4141
    42   void newMapWinNeeded(bool, int);
     42  void newMapWinNeeded(bool);
    4343
    4444  ///This function inserts name of the new edgemap in the list in the combo box
  • nbtab.cc

    r108 r121  
    165165}
    166166
    167 void NoteBookTab::popupNewMapWin(bool itisedge, int prop)
    168 {
    169   prop=prop;
     167void NoteBookTab::popupNewMapWin(bool itisedge)
     168{
    170169  signal_newmap.emit(this, itisedge);
    171170}
  • nbtab.h

    r96 r121  
    1212#include <libgnomecanvasmm/polygon.h>
    1313
     14///One tab in the Notebook that is placed in the main window (\ref MainWin).
     15
     16///One graph and all of its accessories like maps are assigned to one tab in the notebook.
     17///\ref NoteBookTab is responsible for the user defined display of the graph: view can be
     18///set by visualized maps, therefore \ref NoteBookTab must provide an interface to set the
     19///view of graph. This is \ref Mapwin window.
     20///
     21///\ref NoteBookTab is also
     22///responsible for modify the graph if it is
     23///requested. Therefore it is responsible for translating user events to modifications to
     24///do on graph, like node/edge addition/deletion, map modification, addition and so on.
     25///
     26///To be able to solve these tasks the help of \ref MainWin is also needed, for example to
     27///know which editor-tool is active at the moment. Therefore \ref MainWin knows \ref NoteBookTab.
     28///
     29///Some information in the other direction is needed as well: for example when new map creation is requested for this tab
     30///\ref NoteBookTab must ask \ref MainWin to pop-up a \ref NewMapWin. Communication in this direction is realized by signals
     31///therefore \ref NoteBookTab does not know \ref MainWin at all, but in this way it is not necessary.
    1432class NoteBookTab : public Gtk::VBox
    1533{
    1634public:
     35 
     36  ///Constructor of \ref NoteBookTab
     37
     38  ///It initiates the \re GraphDisplayerCanvas, on which the graph will be drawn
     39  ///Signals of \ref MapStorage will be bound to the appropriate callback functions here.
    1740  NoteBookTab();
    1841 
     42  ///Maps assigned to the graph displayed in this \ref NoteBookTab of notebook.
    1943  MapStorage mapstorage;
    2044   
     45  ///Title changement indicator.
     46
     47  ///If graph is loaded from disk or saved to disk or changed its name somehow
     48  ///this signal will be emit to let
     49  ///\ref MainWin know that it has to modify the title of the main window.
     50  ///It contains the new title.
    2151  sigc::signal<void, std::string> signal_title;
    2252
     53  ///Returns \ref signal_title to be the caller able to connect it to a callback function.
    2354  sigc::signal<void, std::string> signal_title_ch();
    2455
     56  ///Indicates that new map window should be popped up.
     57
     58  ///\ref NoteBookTab can ask \ref MainWin to pop up a \ref NweMapWin ny emitting this signal.
     59  ///The signal contains whether an edgemap or a nodemap should be popped up. \ref NewMapWin
     60  ///is not popped up by \ref NoteBookTab, because not only \ref NoteBookTab needs \ref NewMapWin,
     61  ///but for example \ref MainWin and \ref AlgoWin s as well.
    2562  sigc::signal<void, NoteBookTab *, bool> signal_newmap;
    2663
     64  ///Returns \ref signal_newmap to be the caller able to connect it to a callback function.
    2765  sigc::signal<void, NoteBookTab *, bool> signal_newmap_needed();
    2866
     67  ///Loads the given file.
     68
     69  ///The given file will be load in the \ref MapStorage and afeter that
     70  ///\ref GraphDisplayerCanvas will be requested to display the graph.
     71  ///\ref GraphDisplayer will get datas from the recently set \ref MapStorage.
    2972  void readFile(const std::string &);
    3073   
     
    3275  GraphDisplayerCanvas * gd_canvas;
    3376
     77  ///Indicates whether the \ref MapWin is opened or not. See \ref mapwin.
    3478  bool mapwinexists;
    3579
     80  ///Address of the only \ref MapWin that the \ref NoteBookTab can open.
     81
     82  ///Only one of this window can be opened at the same time (\ref mapwinexists),
     83  ///because there is no need for more, one per tab is enough.
     84  ///There won1t be benefit of more than one, but it would be
     85  ///more complicated to synchronize them.
    3686  MapWin * mapwin;
    3787   
     
    4898  virtual void close();
    4999
    50   void propertyChange(bool, int, std::string);
    51   void popupNewMapWin(bool, int);
     100  ///Handles changement of view of graph.
    52101
    53   std::string getActiveEdgeMap(int);
    54   std::string getActiveNodeMap(int);
     102  ///If the user changes the map to show by a property to a nother in \ref MapWin,
     103  ///\ref MapWin will call this function. This function will registrate in \ref MapStorage
     104  ///the new map to display by the changed property. After that \ref MapStorage will
     105  ///emits a signal that will be forwarded to \ref GraphDisplayerCanvas to update the
     106  ///appropriate parts of graph.
     107  ///\param itiesedge whether the changed property is edge property or node property
     108  ///\param prop id of property, see all_include.h
     109  ///\param mapname name of the recently selected map
     110  void propertyChange(bool itisedge, int prop, std::string mapname);
    55111
    56   void registerNewEdgeMap(std::string);
    57   void registerNewNodeMap(std::string);
     112  ///Emits a signal that request \ref MainWin to pop up \ref NewMapWin
    58113
     114  ///This function is called by \ref MapWin.
     115  ///\param itisedge whether the new map should be an edgemap or a nodemap.
     116  void popupNewMapWin(bool itisedge);
     117
     118  ///Returns the actually selected edgemap to visualize by the given property.
     119
     120  ///\ref MapWin calls this function, beacuse it does not know \ref MapStorage.
     121  ///\param prop property to inquire.
     122  std::string getActiveEdgeMap(int prop);
     123
     124  ///Returns the actually selected nodemap to visualize by the given property.
     125
     126  ///\ref MapWin calls this function, beacuse it does not know \ref MapStorage.
     127  ///\param prop property to inquire.
     128  std::string getActiveNodeMap(int prop);
     129
     130  ///Registers recently created edgemap in \ref MapWin.
     131
     132  ///After creation of new map \ref MapStorage emits a signal.
     133  ///This signal is bound to this callback function, that will call
     134  ///a function with the same name and same parameterin \ref MapWin.
     135  ///This call-forwarder function is needed, because \ref Mapstorage does not know \ref MapWin
     136  ///\param mapname name of new map
     137  void registerNewEdgeMap(std::string mapname);
     138
     139  ///Registers recently created nodemap in \ref MapWin.
     140
     141  ///After creation of new map \ref MapStorage emits a signal.
     142  ///This signal is bound to this callback function, that will call
     143  ///a function with the same name and same parameter in \ref MapWin.
     144  ///This call-forwarder function is needed, because \ref Mapstorage does not know \ref MapWin
     145  ///\param mapname name of new map
     146  void registerNewNodeMap(std::string mapname);
     147
     148  ///Pops up and registrates the \ref MapWin of \ref NoteBookTab.
     149 
     150  ///See also
     151  ///\ref mapwin.
    59152  void createMapWin(std::string);
     153
     154  ///Closes and deregistrates the \ref MapWin of \ref NoteBookTab.
     155 
     156  ///See also
     157  ///\ref mapwin.
    60158  void closeMapWin();
    61159};
  • new_map_win.h

    r120 r121  
    2727  ///Initial values of map elements can be given
    2828  ///by numbers or by expressions. From expressions
    29   ///we build first a tree. This is the data structure
     29  ///we build first a tree according to the priorities
     30  ///of operations in the expression. This is the data
     31  ///structure
    3032  ///that can store one tree element.
    3133  struct tree_node
Note: See TracChangeset for help on using the changeset viewer.