23#include "wx/listctrl.h"
63#pragma warning (disable:4005)
65#define MININT -2147483647-1
66#define MAXINT 2147483647
67#define MINFLOAT -1.0e+38F
68#define MAXFLOAT 1.0e+38F
69#define MINDOUBLE -1.0e+299
70#define MAXDOUBLE 1.0e+299
131 void Label(
albaString label1,
albaString *var,
bool bold_label =
false,
bool bold_var =
false,
bool multiline =
false,
double customSizer = 1.0);
134 void HintBox(
int id, wxString label, wxString title =
"Hint",
int mode = 0 ,
bool showIcon =
true);
137 void String(
int id, wxString label, wxString *var, wxString tooltip =
"",
bool multiline =
false,
bool password =
false,
bool interactive =
false,
double customSizer = 1.0);
149 void Double(
int id,
albaString label,
double *var,
double min =
MINDOUBLE,
double max =
MAXDOUBLE,
int decimal_digit = -1,
albaString tooltip =
"",
bool labelAlwaysEnable =
false,
double customSizer = 1.0,wxColour fontColor=wxColour(0,0,0));
152 void Vector(
int id,wxString label,
int var[3],
int min =
MININT,
int max =
MAXINT, wxString tooltip =
"", wxColour *bg_colour = NULL);
155 void Vector(
int id,wxString label,
int var[3],
int minx,
int maxx,
int miny,
int maxy,
int minz,
int maxz, wxString tooltip =
"", wxColour *bg_colour = NULL);
158 void Vector(
int id,wxString label,
float var[3],
float min =
MINFLOAT,
float max =
MAXFLOAT,
int decimal_digit = -1, wxString tooltip =
"", wxColour *bg_colour = NULL);
161 void Vector(
int id,wxString label,
float var[3],
float minx,
float maxx,
float miny,
float maxy,
float minz,
float maxz,
int decimal_digit = -1, wxString tooltip =
"", wxColour *bg_colour = NULL);
164 void Vector(
int id,wxString label,
double var[3],
double min =
MINFLOAT,
double max =
MAXFLOAT,
int decimal_digit = -1, wxString tooltip =
"", wxColour *bg_colour = NULL);
167 void Vector(
int id,wxString label,
double var[3],
double minx,
double maxx,
double miny,
double maxy,
double minz,
double maxz,
int decimal_digit = -1, wxString tooltip =
"", wxColour *bg_colour = NULL);
170 void VectorN(
int id,wxString label,
double *var,
int num_elem = 3,
double min =
MINFLOAT,
double max =
MAXFLOAT,
int decimal_digit = -1, wxString tooltip =
"");
173 void VectorN(
int id,wxString label,
int *var,
int num_elem = 3,
int min =
MININT,
int max =
MAXINT, wxString tooltip =
"");
179 void BoolGrid(
int numRows,
int numColumns, std::vector<int> &ids, std::vector<const char*> &labelsRows,std::vector<const char*> &labelsColumns,
int *var,
albaString tooltip =
"" );
182 void Radio(
int id,wxString label,
int *var,
int numchoices = 0,
const wxString choices[] = NULL,
int dim = 1, wxString tooltip =
"",
int style = wxRA_SPECIFY_COLS);
185 void RadioButton(
int id, wxString label,
int selected=
true, wxString tooltip =
"");
188 wxComboBox *
Combo(
int id,
albaString label,
int *var,
int numchoices = 0,
const wxString choices[] = NULL,
albaString tooltip =
"",
double customSizer = 1.0);
200 void Color(
int id,wxString label,wxColour *var, wxString tooltip =
"");
204 albaGUILutSwatch *Lut(int id,wxString label,vtkLookupTable *lut);
214 albaGUICrossIncremental *
CrossIncremental(
int id,
const char* label,
double *stepVariable,
double *topBottomVariable,
double *leftRightVariable,
int modality ,wxString tooltip =
"",
bool boldLabel =
true,
bool comboStep =
false,
int digits = -1,
albaString *buttonUpDown_text = NULL,
albaString *buttonLeftRight_text = NULL);
217 void TwoButtons(
int firstID,
int secondID,
const char* label1,
const char* label2,
int alignment = wxALL,
int width = -1);
226 void ButtonAndHelp(
int firstID,
int secondID,
const char* label1,
albaString tooltip =
"",
int alignment = wxALL,
int width = -1);
229 void MultipleButtons(
int numButtons,
int numColumns, std::vector<int> &ids, std::vector<const char*> &labels,
int alignment = wxALL );
232 void MultipleImageButtons(
int numButtons,
int numColumns, std::vector<int> &ids, std::vector<const char*> &labels, std::vector<const char*> &images,
int alignment);
238 wxSlider *
Slider(
int id, wxString label,
int *var,
int min =
MININT,
int max =
MAXINT, wxString tooltip =
"",
bool showText=
true);
241 albaGUIFloatSlider *
FloatSlider(
int id, wxString label,
double *var,
double min,
double max, wxSize size = wxDefaultSize, wxString tooltip =
"",
bool textBoxEnable =
true);
247 albaGUIFloatSlider *
FloatSlider(
int id,
double *var,
double min,
double max, wxString minLab, wxString maxLab, wxSize size = wxDefaultSize, wxString tooltip =
"",
bool textBoxEnable =
true);
253 wxListBox *
ListBox(
int id, wxString label =
"",
int height = 60, wxString tooltip =
"",
long lbox_style = 0,
int width = -1);
256 wxListCtrl *
ListCtrl(
int id, wxString label =
"",
int height = 60, wxString tooltip =
"",
long lbox_style = 0,
int width = -1);
259 wxGrid *
Grid(
int id, wxString label =
"",
int height = 60,
int row = 2,
int cols = 2, wxString tooltip =
"");
265 void Add(wxWindow* window,
int option = 0,
int flag = wxEXPAND,
int border = 0) {window->Reparent(
this); window->Show(
true); m_Sizer->Add(window,option,flag,border);};
268 void Add(wxSizer* sizer,
int option = 0,
int flag = wxEXPAND,
int border = 0) {m_Sizer->Add(sizer, option,flag,border);};
271 void AddGui(
albaGUI* gui,
int option = 0,
int flag = wxEXPAND,
int border = 0);
274 bool Remove(wxWindow* window) {window->Show(
false); window->Reparent(
albaGetFrame());
return m_Sizer->Detach(window);};
277 bool Remove(wxSizer* sizer ) {
return m_Sizer->Detach(sizer);};
316 static void AddMenuItem(wxMenu *menu,
int id, wxString label,
char **icon=NULL);
344 int GetModuleId(
int w_id) {assert(w_id > 0 && w_id <= (*GetALBAWidgetId()));
return m_WidgetTableID[w_id -
MINID];};
ALBA_EXPORT wxWindow * albaGetFrame()
return the application frame window.
#define EXPORT_STL_MAP(declspec_, K_, V_)
Implementation of the message object for the Subject/Observer design pattern.
a CheckList that send albaEventNotification in the form albaEvent(this, widget_id,...
Class that represent a widget with 4 buttons and a text array disposed like a cross It can use two ac...
a Slider that can be used to set double values, albaGUIFloatSlider send usual wxWindows Events; Use a...
albaGUILutSwatch : widget representing a LUT, usually used to call the LutEditor.
class name: albaGUIPanel Inherits directly from wxPanel and adds the pointer to the next panel
This class plugs and manage a roll-out gui.
albaGUI is a panel with function to easily create GUI.
void VectorN(int id, wxString label, int *var, int num_elem=3, int min=MININT, int max=MAXINT, wxString tooltip="")
Int vectorN entry widget.
void BoolGrid(int numRows, int numColumns, std::vector< int > &ids, std::vector< const char * > &labelsRows, std::vector< const char * > &labelsColumns, int *var, albaString tooltip="")
Checkbutton grid widget.
void Float(int id, albaString label, float *var, float min=MINFLOAT, float max=MAXFLOAT, int flag=0, int decimal_digit=-1, albaString tooltip="", double customSizer=1.0)
Float entry widget.
void FitGui()
Recalculate 'this' Gui Size and MinSize considering the space required by the children widgets.
void Double(int id, albaString label, double *var, double min=MINDOUBLE, double max=MAXDOUBLE, int decimal_digit=-1, albaString tooltip="", bool labelAlwaysEnable=false, double customSizer=1.0, wxColour fontColor=wxColour(0, 0, 0))
Double entry widget.
wxColour m_BackgroundColor
void Button(int id, albaString button_text, albaString label="", albaString tooltip="")
Button widget.
void Enable(int mod_id, bool enable)
Enable/Disable gui widget.
void Bool(int id, albaString label, int *var, int flag=0, albaString tooltip="")
Checkbutton widget.
void Label(albaString *var, bool bold=false, bool multiline=false)
Label widget.
wxComboBox * Combo(int id, albaString label, int *var, int numchoices=0, const wxString choices[]=NULL, albaString tooltip="", double customSizer=1.0)
Combo widget.
void RadioButton(int id, wxString label, int selected=true, wxString tooltip="")
Radiobutton widget.
void Vector(int id, wxString label, float var[3], float minx, float maxx, float miny, float maxy, float minz, float maxz, int decimal_digit=-1, wxString tooltip="", wxColour *bg_colour=NULL)
Float vector3 entry widget.
void Add(wxSizer *sizer, int option=0, int flag=wxEXPAND, int border=0)
Add sizer to gui sizer.
albaObserver * m_Listener
void OnMouseWheel(wxMouseEvent &event)
void Vector(int id, wxString label, int var[3], int min=MININT, int max=MAXINT, wxString tooltip="", wxColour *bg_colour=NULL)
Integer vector3 entry widget.
wxFont GetBoldFont()
Return the font used for bold label.
void Vector(int id, wxString label, double var[3], double minx, double maxx, double miny, double maxy, double minz, double maxz, int decimal_digit=-1, wxString tooltip="", wxColour *bg_colour=NULL)
Double vector3 entry widget.
void TwoButtons(int firstID, int secondID, const char *label1, const char *label2, int alignment=wxALL, int width=-1)
two generic Buttons widget.
void ButtonAndHelp(int firstID, int secondID, const char *label1, albaString tooltip="", int alignment=wxALL, int width=-1)
two generic Buttons widget.
int GetModuleId(int w_id)
void OnCheckListBox(wxCommandEvent &event)
albaGUIFloatSlider * FloatExpandedSlider(int id, wxString label, double *var, double min, double max, wxSize size=wxDefaultSize, wxString tooltip="", bool textBoxEnable=true)
Float Expanded slider widget.
void SetWidgetValue(int id, WidgetDataType &widget_data)
void ImageButton(int id, const char *label, wxBitmap bitmap, albaString tooltip)
void DirOpen(int id, albaString label, albaString *var, albaString tooltip="")
Dir Open dialog widget.
static void AddMenuItem(wxMenu *menu, int id, wxString label, char **icon=NULL)
void VectorN(int id, wxString label, double *var, int num_elem=3, double min=MINFLOAT, double max=MAXFLOAT, int decimal_digit=-1, wxString tooltip="")
Double vectorN entry widget.
void Vector(int id, wxString label, double var[3], double min=MINFLOAT, double max=MAXFLOAT, int decimal_digit=-1, wxString tooltip="", wxColour *bg_colour=NULL)
Double vector3 entry widget.
void OkCancel()
Ok-Cancel Button widget.
bool Remove(wxWindow *window)
Remove window from gui sizer.
albaGUIFloatSlider * FloatSlider(int id, wxString label, double *var, double min, double max, wxSize size=wxDefaultSize, wxString tooltip="", bool textBoxEnable=true)
Float slider widget.
void OnListBox(wxCommandEvent &event)
void FileSave(int id, albaString label, albaString *var, const albaString wildcard="", albaString tooltip="", bool enableTextCtrl=true)
File save dialog widget.
wxSlider * Slider(int id, wxString label, int *var, int min=MININT, int max=MAXINT, wxString tooltip="", bool showText=true)
Integer slider widget.
bool m_UseBackgroundColor
void Vector(int id, wxString label, int var[3], int minx, int maxx, int miny, int maxy, int minz, int maxz, wxString tooltip="", wxColour *bg_colour=NULL)
Integer vector3 entry widget.
wxListBox * ListBox(int id, wxString label="", int height=60, wxString tooltip="", long lbox_style=0, int width=-1)
Listbox widget.
void OnRadioButton(wxCommandEvent &event)
void DoubleUpDown(int labelID, int firstID, int secondID, albaString label, double *var, double min=MINDOUBLE, double max=MAXDOUBLE, int decimal_digit=-1, albaString tooltip="", bool labelAlwaysEnable=false)
Double entry widget and two generic Buttons widget.
std::map< int, int > m_WidgetTableID
void SetListener(albaObserver *listener)
Set the Listener that will receive event-notification, the Listener can be changed any time
void Update()
Update gui widget.
void Color(int id, wxString label, wxColour *var, wxString tooltip="")
Color dialog widget.
void OnListCtrl(wxCommandEvent &event)
void FileOpen(int id, albaString label, albaString *var, const albaString wildcard="", albaString tooltip="")
File open dialog widget.
void Integer(int id, albaString label, int *var, int min=MININT, int max=MAXINT, albaString tooltip="", bool labelAlwaysEnable=false, double customSizer=1.0)
Integer entry widget.
void OnSlider(wxCommandEvent &event)
albaGUIFloatSlider * FloatSlider(int id, double *var, double min, double max, wxString minLab, wxString maxLab, wxSize size=wxDefaultSize, wxString tooltip="", bool textBoxEnable=true)
Float slider widget.
void MultipleImageButtons(int numButtons, int numColumns, std::vector< int > &ids, std::vector< const char * > &labels, std::vector< const char * > &images, int alignment)
Multiple Image Buttons widget.
void Label(albaString label1, albaString *var, bool bold_label=false, bool bold_var=false, bool multiline=false, double customSizer=1.0)
Double label widget.
void String(int id, wxString label, wxString *var, wxString tooltip="", bool multiline=false, bool password=false, bool interactive=false, double customSizer=1.0)
String entry widget.
void String(int id, albaString label, albaString *var, albaString tooltip="", bool multiline=false, bool password=false, bool interactive=false, double customSizer=1.0)
String entry widget.
void Label(albaString label, bool bold=false, bool multiline=false)
Label widget.
albaGUIRollOut * RollOut(int id, albaString title, albaGUI *roll_gui, bool rollOutOpen=true)
Create a roll out gui.
bool Remove(wxSizer *sizer)
Remove sizer from gui sizer.
void Vector(int id, wxString label, float var[3], float min=MINFLOAT, float max=MAXFLOAT, int decimal_digit=-1, wxString tooltip="", wxColour *bg_colour=NULL)
Float vector3 entry widget.
void MultipleButtons(int numButtons, int numColumns, std::vector< int > &ids, std::vector< const char * > &labels, int alignment=wxALL)
Multiple Generic Buttons widget.
void Label(albaString label1, albaString label2, bool bold_label=false, bool bold_var=false, double customSizer=1.0)
Double label widget.
int GetMetrics(int id)
Return the measure used to layout the widgets - pass one of the GUI_xxx constants.
void HintBox(int id, wxString label, wxString title="Hint", int mode=0, bool showIcon=true)
Hint Box widget.
int GetWidgetId(int mod_id)
wxGrid * Grid(int id, wxString label="", int height=60, int row=2, int cols=2, wxString tooltip="")
Grid widget.
wxListCtrl * ListCtrl(int id, wxString label="", int height=60, wxString tooltip="", long lbox_style=0, int width=-1)
ListCtrl widget.
void AddGui(albaGUI *gui, int option=0, int flag=wxEXPAND, int border=0)
Add gui to gui sizer.
albaGUICrossIncremental * CrossIncremental(int id, const char *label, double *stepVariable, double *topBottomVariable, double *leftRightVariable, int modality, wxString tooltip="", bool boldLabel=true, bool comboStep=false, int digits=-1, albaString *buttonUpDown_text=NULL, albaString *buttonLeftRight_text=NULL)
Widget with 4 buttons and a text array disposed like a cross.
void Radio(int id, wxString label, int *var, int numchoices=0, const wxString choices[]=NULL, int dim=1, wxString tooltip="", int style=wxRA_SPECIFY_COLS)
RadioBox widget.
void Button(int id, albaString *label, albaString button_text, albaString tooltip="")
Button widget with variable label.
albaGUICheckListBox * CheckList(int id, wxString label="", int height=60, wxString tooltip="")
Checked listbox widget.
albaGUI(albaObserver *listener)
void GetWidgetValue(long widget_id, WidgetDataType &widget_data)
void Add(wxWindow *window, int option=0, int flag=wxEXPAND, int border=0)
Add window to gui sizer.
void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
void Reparent(wxWindow *parent)
place the GUI on a different parent, and perform the required Resize/Stretch/ and Show
void Divider(long style=0)
Separator widget.
Interface implementing the Observer of the Subject/Observer design pattern.
albaString - performs common string operations on c-strings.