|
NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <variableviewer.hpp>
Public Member Functions | |
| VariableViewer (wxWindow *parent, NumeReWindow *mainWin, int fieldsize=300, bool debugMode=false) | |
| Constructor. More... | |
| void | ExpandAll () |
| This member function expands all nodes, which contain child nodes. More... | |
| void | OnRightClick (wxTreeEvent &event) |
| This member function creates the pop-up menu in the var viewer case (it does nothing in debugger mode and also nothing for non-tables). More... | |
| void | OnDoubleClick (wxTreeEvent &event) |
| This event handler displays the selected table. More... | |
| void | setDebuggerMode (bool mode=true) |
| This member function creates or removes unneeded tree root items and handles the debugger mode. More... | |
| void | UpdateVariables (const std::vector< std::string > &vVarList, size_t nNumerics, size_t nStrings, size_t nTables, size_t nClusters, size_t nArguments=0, size_t nGlobals=0) |
| This member function is used to update the variable list, which is displayed by this control. More... | |
| DECLARE_EVENT_TABLE () | |
Private Member Functions | |
| bool | checkPresence (const std::string &sVar) |
| This member function checks, whether a variable was already part of the previous variable set (only used in debug mode). More... | |
| bool | checkSpecialVals (const std::string &sVar) |
| This member functions checks for special variable names, to highlight them (not used in debug mode). More... | |
| wxTreeItemId | AppendVariable (wxTreeItemId rootNode, std::string sVar) |
| This member function splits the passed variable at tabulator characters and adds its contents to the current tree item. It will also create the tooltip for this item. More... | |
| void | ClearTree () |
| A simple helper function to clean the tree. More... | |
| void | HandleDebugActions (const std::vector< std::string > &vVarList) |
| This member function handles every task, which is specific to the debug mode after a variable update. More... | |
| wxString | GetInternalName (wxTreeItemId id) |
| Returns the internal variable name of the selected variable. More... | |
| void | OnMenuEvent (wxCommandEvent &event) |
| This member function handles the menu events created from the popup menu and redirects the control to the corresponding functions. More... | |
| void | OnNewTable () |
| This member function displays a text entry dialog to enter the new table names and sends the corresponding command to the kernel. More... | |
| void | OnShowTable (const wxString &table, const wxString &tableDisplayName) |
| This member function displays the selected table. More... | |
| void | OnEditTable (const wxString &table) |
| This member function displays the selected table for editing. More... | |
| void | OnRenameTable (const wxString &table) |
| This member function displays a text entry dialog to choose a new name for the selected table. More... | |
| void | OnRemoveTable (const wxString &table) |
| This member function removes the selected table. More... | |
| void | OnSaveTable (const wxString &table) |
| This member function saves the selected table. More... | |
| void | OnSaveasTable (const wxString &table) |
| This member function displays a text entry dialog to choose the file name for the selected table, which is then used to create a save file containing the table data. More... | |
| void | OnCopyValue (const wxString &value) |
| Copies the selected text to the clip board. More... | |
Private Attributes | |
| bool | debuggerMode |
| std::vector< std::string > | vLastVarSet |
| int | nDataFieldSize |
| bool | bExpandedState [6] |
| wxTreeItemId | numRoot |
| wxTreeItemId | stringRoot |
| wxTreeItemId | tableRoot |
| wxTreeItemId | clusterRoot |
| wxTreeItemId | argumentRoot |
| wxTreeItemId | globalRoot |
| wxTreeItemId | selectedID |
| NumeReWindow * | mainWindow |
Definition at line 31 of file variableviewer.hpp.
| VariableViewer::VariableViewer | ( | wxWindow * | parent, |
| NumeReWindow * | mainWin, | ||
| int | fieldsize = 300, |
||
| bool | debugMode = false |
||
| ) |
Constructor.
| parent | wxWindow* |
| mainWin | NumeReWindow* |
| fieldsize | int |
| debugMode | bool |
Definition at line 63 of file variableviewer.cpp.
References _guilang, Language::get(), and VALUECOLUMN.
|
private |
This member function splits the passed variable at tabulator characters and adds its contents to the current tree item. It will also create the tooltip for this item.
| rootNode | wxTreeItemId |
| sVar | std::string |
Definition at line 175 of file variableviewer.cpp.
References CLASSCOLUMN, debuggerMode, DIMCOLUMN, SIZECOLUMN, and VALUECOLUMN.
Referenced by UpdateVariables().
|
private |
This member function checks, whether a variable was already part of the previous variable set (only used in debug mode).
| sVar | const std::string& |
Definition at line 114 of file variableviewer.cpp.
References vLastVarSet.
Referenced by UpdateVariables().
|
private |
This member functions checks for special variable names, to highlight them (not used in debug mode).
| sVar | const std::string& |
Definition at line 135 of file variableviewer.cpp.
Referenced by UpdateVariables().
|
private |
A simple helper function to clean the tree.
Definition at line 225 of file variableviewer.cpp.
References argumentRoot, bExpandedState, clusterRoot, globalRoot, numRoot, stringRoot, and tableRoot.
Referenced by UpdateVariables().
| VariableViewer::DECLARE_EVENT_TABLE | ( | ) |
| void VariableViewer::ExpandAll | ( | ) |
This member function expands all nodes, which contain child nodes.
Definition at line 514 of file variableviewer.cpp.
References argumentRoot, bExpandedState, clusterRoot, globalRoot, numRoot, stringRoot, and tableRoot.
Referenced by UpdateVariables().
|
private |
Returns the internal variable name of the selected variable.
| id | wxTreeItemId |
Definition at line 288 of file variableviewer.cpp.
Referenced by OnDoubleClick(), and OnMenuEvent().
|
private |
This member function handles every task, which is specific to the debug mode after a variable update.
| vVarList | const std::vector<std::string>& |
Definition at line 271 of file variableviewer.cpp.
References debuggerMode, and vLastVarSet.
Referenced by UpdateVariables().
|
private |
Copies the selected text to the clip board.
| value | const wxString& |
Definition at line 497 of file variableviewer.cpp.
Referenced by OnMenuEvent().
| void VariableViewer::OnDoubleClick | ( | wxTreeEvent & | event | ) |
This event handler displays the selected table.
| event | wxTreeEvent& |
Definition at line 607 of file variableviewer.cpp.
References argumentRoot, clusterRoot, debuggerMode, GetInternalName(), globalRoot, OnShowTable(), and tableRoot.
|
private |
This member function displays the selected table for editing.
| table | const wxString& |
Definition at line 414 of file variableviewer.cpp.
References mainWindow, and NumeReWindow::pass_command().
Referenced by OnMenuEvent().
|
private |
This member function handles the menu events created from the popup menu and redirects the control to the corresponding functions.
| event | wxCommandEvent& |
Definition at line 304 of file variableviewer.cpp.
References GetInternalName(), ID_VARVIEWER_COPYVALUE, ID_VARVIEWER_EDIT, ID_VARVIEWER_NEW, ID_VARVIEWER_REMOVE, ID_VARVIEWER_RENAME, ID_VARVIEWER_SAVE, ID_VARVIEWER_SAVEAS, ID_VARVIEWER_SHOW, OnCopyValue(), OnEditTable(), OnNewTable(), OnRemoveTable(), OnRenameTable(), OnSaveasTable(), OnSaveTable(), OnShowTable(), selectedID, and VALUECOLUMN.
|
private |
This member function displays a text entry dialog to enter the new table names and sends the corresponding command to the kernel.
Definition at line 343 of file variableviewer.cpp.
References _guilang, Language::get(), mainWindow, and NumeReWindow::pass_command().
Referenced by OnMenuEvent().
|
private |
This member function removes the selected table.
| table | const wxString& |
Definition at line 448 of file variableviewer.cpp.
References mainWindow, and NumeReWindow::pass_command().
Referenced by OnMenuEvent().
|
private |
This member function displays a text entry dialog to choose a new name for the selected table.
| table | const wxString& |
Definition at line 429 of file variableviewer.cpp.
References _guilang, Language::get(), mainWindow, and NumeReWindow::pass_command().
Referenced by OnMenuEvent().
| void VariableViewer::OnRightClick | ( | wxTreeEvent & | event | ) |
This member function creates the pop-up menu in the var viewer case (it does nothing in debugger mode and also nothing for non-tables).
| event | wxTreeEvent& |
Definition at line 546 of file variableviewer.cpp.
References _guilang, debuggerMode, Language::get(), ID_VARVIEWER_COPYVALUE, ID_VARVIEWER_EDIT, ID_VARVIEWER_NEW, ID_VARVIEWER_REMOVE, ID_VARVIEWER_RENAME, ID_VARVIEWER_SAVE, ID_VARVIEWER_SAVEAS, ID_VARVIEWER_SHOW, selectedID, and tableRoot.
|
private |
This member function displays a text entry dialog to choose the file name for the selected table, which is then used to create a save file containing the table data.
| table | const wxString& |
Definition at line 478 of file variableviewer.cpp.
References _guilang, Language::get(), mainWindow, and NumeReWindow::pass_command().
Referenced by OnMenuEvent().
|
private |
This member function saves the selected table.
| table | const wxString& |
Definition at line 462 of file variableviewer.cpp.
References mainWindow, and NumeReWindow::pass_command().
Referenced by OnMenuEvent().
|
private |
This member function displays the selected table.
| table | const wxString& |
| tableDisplayName | const wxString& |
Definition at line 400 of file variableviewer.cpp.
References mainWindow, and NumeReWindow::showTable().
Referenced by OnDoubleClick(), and OnMenuEvent().
| void VariableViewer::setDebuggerMode | ( | bool | mode = true | ) |
This member function creates or removes unneeded tree root items and handles the debugger mode.
| mode | bool |
Definition at line 640 of file variableviewer.cpp.
References _guilang, argumentRoot, CLASSCOLUMN, debuggerMode, Language::get(), NumeReWindow::getOptions(), Options::GetShowGlobalVariables(), Options::GetShowProcedureArguments(), globalRoot, and mainWindow.
Referenced by DebugViewer::updateSettings().
| void VariableViewer::UpdateVariables | ( | const std::vector< std::string > & | vVarList, |
| size_t | nNumerics, | ||
| size_t | nStrings, | ||
| size_t | nTables, | ||
| size_t | nClusters, | ||
| size_t | nArguments = 0, |
||
| size_t | nGlobals = 0 |
||
| ) |
This member function is used to update the variable list, which is displayed by this control.
| vVarList | const std::vector<std::string>& |
| nNumerics | size_t |
| nStrings | size_t |
| nTables | size_t |
| nClusters | size_t |
| nArguments | size_t |
| nGlobals | size_t |
Definition at line 692 of file variableviewer.cpp.
References AppendVariable(), argumentRoot, checkPresence(), checkSpecialVals(), ClearTree(), clusterRoot, debuggerMode, DIMCOLUMN, ExpandAll(), globalRoot, HandleDebugActions(), numRoot, stringRoot, tableRoot, and toString().
Referenced by DebugViewer::getInformationByStackId(), and NumeReWindow::UpdateVarViewer().
|
private |
Definition at line 42 of file variableviewer.hpp.
Referenced by ClearTree(), ExpandAll(), OnDoubleClick(), setDebuggerMode(), and UpdateVariables().
|
private |
Definition at line 37 of file variableviewer.hpp.
Referenced by ClearTree(), and ExpandAll().
|
private |
Definition at line 41 of file variableviewer.hpp.
Referenced by ClearTree(), ExpandAll(), OnDoubleClick(), and UpdateVariables().
|
private |
Definition at line 34 of file variableviewer.hpp.
Referenced by AppendVariable(), HandleDebugActions(), OnDoubleClick(), OnRightClick(), setDebuggerMode(), and UpdateVariables().
|
private |
Definition at line 43 of file variableviewer.hpp.
Referenced by ClearTree(), ExpandAll(), OnDoubleClick(), setDebuggerMode(), and UpdateVariables().
|
private |
Definition at line 46 of file variableviewer.hpp.
Referenced by OnEditTable(), OnNewTable(), OnRemoveTable(), OnRenameTable(), OnSaveasTable(), OnSaveTable(), OnShowTable(), and setDebuggerMode().
|
private |
Definition at line 36 of file variableviewer.hpp.
|
private |
Definition at line 38 of file variableviewer.hpp.
Referenced by ClearTree(), ExpandAll(), and UpdateVariables().
|
private |
Definition at line 44 of file variableviewer.hpp.
Referenced by OnMenuEvent(), and OnRightClick().
|
private |
Definition at line 39 of file variableviewer.hpp.
Referenced by ClearTree(), ExpandAll(), and UpdateVariables().
|
private |
Definition at line 40 of file variableviewer.hpp.
Referenced by ClearTree(), ExpandAll(), OnDoubleClick(), OnRightClick(), and UpdateVariables().
|
private |
Definition at line 35 of file variableviewer.hpp.
Referenced by checkPresence(), and HandleDebugActions().