NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This is the window manager of the kernel. All windows opened by the kernel will be registered here. More...
#include <windowmanager.hpp>
Public Member Functions | |
WindowManager () | |
Empty window manager constructor. More... | |
~WindowManager () | |
Destructor. It will detach all registered windows from the manager. This is done to avoid segmentation faults during application shut down. More... | |
size_t | createWindow (GraphHelper *graph) |
This public member function will create a window object containing the passed graph. More... | |
size_t | createWindow (WindowType type, const WindowSettings &settings) |
This public member function will create a dialog window, which is described by the passed WindowSettings object. More... | |
size_t | createWindow (tinyxml2::XMLDocument *layoutString) |
This public member function will create a custom window, which is described by the passed layout XML object. More... | |
WindowInformation | getWindowInformation (size_t windowId) |
This public member function will return the window information stored in the internal map. If the window was closed by the user and this was noted in the window information then the object is deleted from the internal map. More... | |
WindowInformation | getWindowInformationModal (size_t windowId) |
This public member function will return the window information stored in the internal map. The access is modal, i.e. it's checked repeatedly, whether a window has been closed until the information is returned. The object is then deleted from the internal map. More... | |
Private Member Functions | |
void | updateWindowInformation (const WindowInformation &information) |
This function is used by the registered windows to inform the window manager about new window statuses or return values. More... | |
size_t | registerWindow (Window *window, size_t id) |
This member function registers a new window or changes the registration to a new window. More... | |
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 both matching the internal mapping. More... | |
Private Attributes | |
std::map< size_t, WindowInformation > | m_windowMap |
Friends | |
class | Window |
This is the window manager of the kernel. All windows opened by the kernel will be registered here.
Definition at line 231 of file windowmanager.hpp.
NumeRe::WindowManager::WindowManager | ( | ) |
Empty window manager constructor.
Definition at line 616 of file windowmanager.cpp.
NumeRe::WindowManager::~WindowManager | ( | ) |
Destructor. It will detach all registered windows from the manager. This is done to avoid segmentation faults during application shut down.
Definition at line 628 of file windowmanager.cpp.
References m_windowMap, and NumeRe::STATUS_CANCEL.
size_t NumeRe::WindowManager::createWindow | ( | GraphHelper * | graph | ) |
This public member function will create a window object containing the passed graph.
graph | GraphHelper* |
Definition at line 650 of file windowmanager.cpp.
References NumeRe::Window::getId(), NumeReKernel::getInstance(), NumeReKernel::showWindow(), and NumeRe::WINDOW_GRAPH.
Referenced by createPlot(), createPlotForHist1D(), createPlotsForHist2D(), dialogCommand(), and windowCommand().
size_t NumeRe::WindowManager::createWindow | ( | tinyxml2::XMLDocument * | layoutString | ) |
This public member function will create a custom window, which is described by the passed layout XML object.
layoutString | tinyxml2::XMLDocument* |
Definition at line 689 of file windowmanager.cpp.
References NumeRe::Window::getId(), NumeReKernel::getInstance(), NumeReKernel::showWindow(), and NumeRe::WINDOW_CUSTOM.
size_t NumeRe::WindowManager::createWindow | ( | WindowType | type, |
const WindowSettings & | settings | ||
) |
This public member function will create a dialog window, which is described by the passed WindowSettings object.
type | WindowType |
settings | const WindowSettings& |
Definition at line 670 of file windowmanager.cpp.
References NumeRe::Window::getId(), NumeReKernel::getInstance(), and NumeReKernel::showWindow().
WindowInformation NumeRe::WindowManager::getWindowInformation | ( | size_t | windowId | ) |
This public member function will return the window information stored in the internal map. If the window was closed by the user and this was noted in the window information then the object is deleted from the internal map.
windowId | size_t |
Definition at line 711 of file windowmanager.cpp.
References m_windowMap, and NumeRe::WindowInformation::nStatus.
Referenced by createPlot(), getWindow(), and windowCommand().
WindowInformation NumeRe::WindowManager::getWindowInformationModal | ( | size_t | windowId | ) |
This public member function will return the window information stored in the internal map. The access is modal, i.e. it's checked repeatedly, whether a window has been closed until the information is returned. The object is then deleted from the internal map.
windowId | size_t |
Definition at line 747 of file windowmanager.cpp.
References m_windowMap, NumeRe::WindowInformation::nStatus, and NumeRe::STATUS_RUNNING.
Referenced by dialogCommand().
|
private |
This member function registers a new window or changes the registration to a new window.
window | Window* |
id | size_t |
Definition at line 562 of file windowmanager.cpp.
References m_windowMap.
Referenced by NumeRe::Window::registerWindow().
|
private |
This member function will unregister a window. This is done only if the ID and the window pointer are both matching the internal mapping.
window | Window* |
id | size_t |
Definition at line 591 of file windowmanager.cpp.
References NumeRe::Window::getType(), m_windowMap, NumeRe::STATUS_CANCEL, NumeRe::STATUS_RUNNING, and NumeRe::WINDOW_GRAPH.
Referenced by NumeRe::Window::unregisterWindow().
|
private |
This function is used by the registered windows to inform the window manager about new window statuses or return values.
information | const WindowInformation& |
Definition at line 545 of file windowmanager.cpp.
References m_windowMap, and NumeRe::WindowInformation::nWindowID.
Referenced by NumeRe::Window::updateWindowInformation().
|
friend |
Definition at line 234 of file windowmanager.hpp.
|
private |
Definition at line 236 of file windowmanager.hpp.
Referenced by getWindowInformation(), getWindowInformationModal(), registerWindow(), unregisterWindow(), updateWindowInformation(), and ~WindowManager().