00001
00002
00003 #ifndef GUINODEPARAMETERS_H
00004 #define GUINODEPARAMETERS_H
00005
00006 #include <string>
00007 #include <vector>
00008 #include <gnome.h>
00009
00010 #include "UINodeParameters.h"
00011 #include "GUINode.h"
00012
00013 namespace FD {
00014
00015 class UINode;
00016
00017 class ParameterData {
00018 public:
00019
00020 GtkWidget *optionmenu;
00021 GtkWidget *optionmenu_menu;
00022 GtkWidget *combo_entry;
00023 GtkWidget *entry;
00024 GtkWidget *label;
00025 };
00026
00027
00028
00029
00030
00031
00032 class GUINodeParameters : public UINodeParameters{
00033
00034 protected:
00035 GtkWidget *nodeproperty;
00036 std::vector<ParameterData> params;
00037 GtkWidget *text_comments;
00038 GtkWidget *list1;
00039 GtkWidget *list2;
00040 GtkWidget *input_entry, *output_entry;
00041 GtkWidget *inputSelect, *outputSelect;
00042 void createWindow();
00043
00044 public:
00045 GUINodeParameters(UINode *_node, std::string type);
00046 virtual ~GUINodeParameters();
00047 void show();
00048 void hide();
00049 void apply();
00050 void changed();
00051 ParameterData *getParamDataNamed(std::string n);
00052
00053 GUINode *getGUINode() {return dynamic_cast<GUINode*>(node);}
00054 void addInput();
00055 void addOutput();
00056 void removeInput();
00057 void removeOutput();
00058 void setInputSelect(GtkWidget *w) {inputSelect=w;}
00059 void setOutputSelect(GtkWidget *w) {outputSelect=w;}
00060 void unsetInputSelect(GtkWidget *w) {if (inputSelect==w) inputSelect=NULL;}
00061 void unsetOutputSelect(GtkWidget *w) {if (outputSelect==w) outputSelect=NULL;}
00062 };
00063
00064 }
00065
00066 #endif