20#ifndef WINDOWMANAGER_HPP
21#define WINDOWMANAGER_HPP
191 std::vector<int>
getWindowItems(
const std::string& _selection)
const;
197 std::string
getPropValue(
const std::string& varName)
const;
201 bool setItemLabel(
const std::string& _label,
int windowItemID);
202 bool setItemState(
const std::string& _state,
int windowItemID);
203 bool setItemColor(
const std::string& _color,
int windowItemID);
205 bool setPropValue(
const std::string& _value,
const std::string& varName);
This class represents a window, which can be created by the user during run-time by using a layout sc...
This class encapsulates the mglGraph object during transmission from the kernel to the GUI.
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.
std::string getItemColor(int windowItemID) const
Returns the color of the selected window item as a string.
bool setItemState(const std::string &_state, int windowItemID)
Enables changing the state of the selected window item to the passed state.
void updateWindowInformation(int status, const std::string &_return)
This public member function can be used to update the stored window information in the window manager...
WindowManager * m_manager
Window & operator=(const Window &window)
This member function is the public overload of the assignment operator.
Window()
Default constructor. Initializes an invalid window.
tinyxml2::XMLDocument * m_layout
WinItemValue getItemValue(int windowItemID) const
Returns the value of the selected window item as a string.
std::vector< int > getWindowItems(const std::string &_selection) const
Returns a vector of item ids corresponding to the available window items of this window.
void assignWindow(const Window &window)
This private member function is the generalisation of the assignment operator and the copy constructo...
std::string getItemLabel(int windowItemID) const
Returns the label of the selected window item as a string.
void registerWindow()
This private member function registers the current window in the window manager. This will automatica...
const tinyxml2::XMLDocument * getLayout() const
bool setItemColor(const std::string &_color, int windowItemID)
Enables changing the color of the selected window item to the passed color.
WindowType getType() const
std::string getItemState(int windowItemID) const
Returns the state of the selected window item as a string.
CustomWindow * m_customWindow
std::string getProperties() const
Returns a list of all available window properties (comp. prop) in this window.
~Window()
Destructor. Unregisters the current window in the window manager and deletes the layout pointer,...
bool setItemGraph(GraphHelper *_helper, int windowItemID)
Updates the graph in the custom window.
void connect(CustomWindow *_window)
bool setItemValue(const WinItemValue &_value, int windowItemID)
Enables changing the value of the selected window item to the passed value.
bool setPropValue(const std::string &_value, const std::string &varName)
This function sets the value of the selected window property.
void detach()
This private member function is used by the window manager to detach itself from this window to avoid...
const WindowSettings & getWindowSettings() const
bool closeWindow()
Closes the current window.
void unregisterWindow()
This private member function will unregister the current window in the window manager.
std::string getPropValue(const std::string &varName) const
Returns the value of the selected property as a string.
bool setItemLabel(const std::string &_label, int windowItemID)
Enables changing the label of the selected window item to the passed label.
WindowSettings m_settings
This is the window manager of the kernel. All windows opened by the kernel will be registered here.
void unregisterWindow(Window *window, size_t id)
This member function will unregister a window. This is done only if the ID and the window pointer are...
size_t registerWindow(Window *window, size_t id)
This member function registers a new window or changes the registration to a new window.
WindowInformation getWindowInformationModal(size_t windowId)
This public member function will return the window information stored in the internal map....
WindowManager()
Empty window manager constructor.
WindowInformation getWindowInformation(size_t windowId)
This public member function will return the window information stored in the internal map....
std::map< size_t, WindowInformation > m_windowMap
~WindowManager()
Destructor. It will detach all registered windows from the manager. This is done to avoid segmentatio...
void updateWindowInformation(const WindowInformation &information)
This function is used by the registered windows to inform the window manager about new window statuse...
size_t createWindow(GraphHelper *graph)
This public member function will create a window object containing the passed graph.
WindowType
Enumeration for the window type.
WindowStatus
Enumeration for the status of a displayed dialog.
WindowControls
Enumeration for the contained window controls.
Kernel representation of the WindowItemValue structure of the CustomWindow class.
This class contains the window information to create the dialog in the GUI.
WindowSettings(int ctrls=CTRL_NONE, bool modal=false, const std::string &message="", const std::string &title="NumeRe: Window", const std::string &expression="")