19#ifndef CUSTOMWINDOW_HPP
20#define CUSTOMWINDOW_HPP
26#include <wx/treelist.h>
28#include "../../kernel/windowmanager.hpp"
29#include "../../kernel/core/datamanagement/table.hpp"
103 void handleEvent(wxEvent& event,
const wxString& sEventType);
106 wxArrayString
getChoices(wxString& choices)
const;
124 bool setItemLabel(
const wxString& _label,
int windowItemID);
125 bool setItemState(
const wxString& _state,
int windowItemID);
126 bool setItemColor(
const wxString& _color,
int windowItemID);
128 bool setPropValue(
const wxString& _value,
const wxString& varName);
131 void OnClick(wxCommandEvent& event);
132 void OnChange(wxCommandEvent& event);
133 void OnSpin(wxSpinEvent& event);
135 void OnClose(wxCloseEvent& event);
This class represents a window, which can be created by the user during run-time by using a layout sc...
bool setItemState(const wxString &_state, int windowItemID)
Change the state of the selected item.
void layoutChild(const tinyxml2::XMLElement *currentChild, wxWindow *currParent, wxSizer *currSizer, GroupPanel *_groupPanel)
This member function can be called recursively and creates the layout for the current XMLElement's ch...
void OnChange(wxCommandEvent &event)
Generic onchange event handler.
bool setItemValue(WindowItemValue &_value, int windowItemID)
Change the value of the selected item.
void OnSpin(wxSpinEvent &event)
wxSpinCtrl event handler.
wxString getItemLabel(int windowItemID) const
Get the label of the selected item.
void handleEvent(wxEvent &event, const wxString &sEventType)
This member function is the central kernel interaction event handler. Will be called from the wxWidge...
void OnMouseLeftDown(wxMouseEvent &event)
Mouse event handler.
wxString removeQuotationMarks(wxString sString) const
Private member function to convert a kernel string into a usual string.
void OnMenuEvent(wxCommandEvent &event)
Menu event handler.
bool setItemGraph(GraphHelper *_helper, int windowItemID)
Updates the selected grapher item.
std::vector< int > getWindowItems(WindowItemType _type) const
Returns a list of all window item IDs, which correspond to the selected WindowItemType.
bool getItemParameters(int windowItemID, WindowItemParams ¶ms) const
Returns the parameters of the selected window item.
bool setPropValue(const wxString &_value, const wxString &varName)
Sets the value of the selected window property.
bool setItemLabel(const wxString &_label, int windowItemID)
Change the label of the selected item.
bool getWindowParameters(WindowItemParams ¶ms) const
Returns the parameters of this window.
wxString getProperties() const
Returns a list of all available window properties.
void layoutMenu(const tinyxml2::XMLElement *currentChild, wxMenu *currMenu)
This member function can be called recursively and creates menus and submenus for the current window ...
wxString getPropValue(const wxString &varName) const
Returns the value of the selected window property.
void OnTreeListEvent(wxTreeListEvent &event)
Tree list control event handler.
std::map< wxString, wxString > m_varTable
NumeRe::Window m_windowRef
wxString getItemColor(int windowItemID) const
Get the color of the selected item.
void OnClose(wxCloseEvent &event)
OnClose event handler.
CustomWindow(wxWindow *parent, const NumeRe::Window &windowRef)
CustomWindow constructor. Connects this window with the NumeRe::Window instance and triggers the layo...
wxString getItemState(int windowItemID) const
Get the state of the selected item.
void OnCellSelect(wxGridEvent &event)
wxGrid event handler.
bool setItemColor(const wxString &_color, int windowItemID)
Change the color of the selected item.
wxArrayString decodeEventHandlerFunction(const wxString &sEventHandler) const
This member function decodes the arguments of a event handler function and returns them as a wxArrayS...
void OnSizeEvent(wxSizeEvent &event)
On size event handler.
std::map< int, std::pair< WindowItemType, wxObject * > > m_windowItems
std::map< int, wxString > m_eventTable
void OnClick(wxCommandEvent &event)
Button click event handler.
wxArrayString getChoices(wxString &choices) const
A simple tokenizer to separate a list of strings into multiple strings.
void Refresh()
Wrapper for wxWindow::Refresh to use it together with CallAfter().
void layout()
This member function evaluates the layout supplied by the user via a tinyxml2::XMLDocument instance.
WindowItemValue getItemValue(int windowItemID) const
Get the value of the selected item.
bool closeWindow()
Close this window.
This class encapsulates the mglGraph object during transmission from the kernel to the GUI.
This class simplifies the creation of simple windows and creates a common layout among all windows.
This data container is a copy- efficient table to interchange data between Kernel and GUI.
This class represents an abstract window handled by the window manager.
A structure to simplify the reading of all parameter values of each window item.
A structure to simplify reading and updating window item values.