author | alpar |
Mon, 24 Oct 2005 08:12:26 +0000 | |
branch | gui |
changeset 84 | 09b09efab0a1 |
parent 81 | 5ad61c33487c |
child 85 | 0b2217328320 |
permissions | -rw-r--r-- |
hegyi@81 | 1 |
// -*- C++ -*- // |
hegyi@81 | 2 |
|
hegyi@81 | 3 |
#ifndef MAP_SELECTOR_H |
hegyi@81 | 4 |
#define MAP_SELECTOR_H |
hegyi@81 | 5 |
|
hegyi@81 | 6 |
class MapSelector; |
hegyi@81 | 7 |
|
hegyi@81 | 8 |
#include "all_include.h" |
hegyi@81 | 9 |
#include "mapstorage.h" |
hegyi@82 | 10 |
#include "new_map_win.h" |
hegyi@81 | 11 |
#include "graph_displayer_canvas.h" |
hegyi@81 | 12 |
#include <libgnomecanvasmm.h> |
hegyi@81 | 13 |
#include <libgnomecanvasmm/polygon.h> |
hegyi@81 | 14 |
|
hegyi@81 | 15 |
class MapSelector : public Gtk::HBox |
hegyi@81 | 16 |
{ |
hegyi@81 | 17 |
protected: |
hegyi@81 | 18 |
GraphDisplayerCanvas & gdc; |
hegyi@81 | 19 |
///The \ref MapStorage in which the visualizable maps are stored |
hegyi@81 | 20 |
MapStorage & ms; |
hegyi@82 | 21 |
NewMapWin & nmw; |
hegyi@81 | 22 |
|
hegyi@81 | 23 |
int id; |
hegyi@81 | 24 |
|
hegyi@81 | 25 |
bool itisedge; |
hegyi@81 | 26 |
|
hegyi@81 | 27 |
bool default_state; |
hegyi@81 | 28 |
|
hegyi@81 | 29 |
Gtk::ComboBoxText cbt; |
hegyi@81 | 30 |
|
hegyi@81 | 31 |
Gtk::Button * newbut, * defbut; |
hegyi@81 | 32 |
|
hegyi@81 | 33 |
Gtk::HBox hbox; |
hegyi@81 | 34 |
|
hegyi@81 | 35 |
Gtk::Label * label; |
hegyi@81 | 36 |
|
hegyi@81 | 37 |
Node node_to_update; |
hegyi@81 | 38 |
Edge edge_to_update; |
hegyi@81 | 39 |
|
hegyi@81 | 40 |
|
hegyi@81 | 41 |
public: |
hegyi@81 | 42 |
|
hegyi@82 | 43 |
MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool); |
hegyi@81 | 44 |
|
hegyi@81 | 45 |
void update_list(); |
hegyi@81 | 46 |
|
hegyi@81 | 47 |
///If a radiobutton is clicked, this function determines |
hegyi@81 | 48 |
///which button was that and after that calls the |
hegyi@81 | 49 |
///appropriate function of the \ref GraphDisplayerCanvas |
hegyi@81 | 50 |
///to change the visible values of that attribute. |
hegyi@81 | 51 |
virtual void comboChanged(); |
hegyi@81 | 52 |
|
hegyi@81 | 53 |
virtual void reset(); |
hegyi@81 | 54 |
|
hegyi@81 | 55 |
virtual void update(Node node); |
hegyi@81 | 56 |
virtual void update(Edge edge); |
hegyi@81 | 57 |
|
hegyi@81 | 58 |
Glib::ustring get_active_text(); |
hegyi@81 | 59 |
void set_active_text(Glib::ustring); |
hegyi@81 | 60 |
void append_text(Glib::ustring); |
hegyi@81 | 61 |
}; |
hegyi@81 | 62 |
|
hegyi@81 | 63 |
#endif |