|
Stimfit 0.12.7
|
The application, derived from wxApp. More...
#include <app.h>


Public Member Functions | |
| wxStfApp () | |
| Constructor. | |
| virtual bool | OnInit () |
| Initialise the application. | |
| virtual int | OnExit () |
| Exit the application. | |
| wxStfChildFrame * | CreateChildFrame (wxDocument *doc, wxView *view) |
| Creates a new child frame. | |
| wxStfDoc * | GetActiveDoc () const |
| Retrieves the currently active document. | |
| wxStfView * | GetActiveView () const |
| Sets the currently active document. | |
| void | ErrorMsg (const wxString &msg) const |
| Displays a message box when an error has occured. | |
| void | ExceptMsg (const wxString &msg) const |
| Displays a message box when an exception has occured. | |
| void | InfoMsg (const wxString &msg) const |
| Displays a message box with information. | |
| bool | get_directTxtImport () const |
| Indicates whether text files should be imported directly without showing an import settings dialog. | |
| void | set_directTxtImport (bool directTxtImport_) |
| Determines whether text files should be imported directly without showing an import filter settings dialog. | |
| const stfio::txtImportSettings & | GetTxtImport () const |
| Retrieves the text import filter settings. | |
| void | set_txtImportSettings (const stfio::txtImportSettings &txtImport_) |
| Sets the text import filter settings. | |
| const std::vector < stf::storedFunc > & | GetFuncLib () const |
| Retrieves the functions that are available for least-squares minimisation. | |
| stf::storedFunc * | GetFuncLibPtr (std::size_t at) |
| Retrieves a pointer to a function for least-squares minimisation. | |
| stf::storedFunc * | GetLinFuncPtr () |
| Retrieves a pointer to a function for least-squares minimisation. | |
| const std::vector < stf::Extension > & | GetExtensionLib () const |
| Retrieves the user-defined extension functions. | |
| wxStfCursorsDlg * | GetCursorsDialog () const |
| Retrieves the cursor settings dialog. | |
| std::vector< stf::SectionPointer > | GetSectionsWithFits () const |
| Retrieves all sections with fits. | |
| void | wxWriteProfileInt (const wxString &main, const wxString &sub, int value) const |
| Writes an integer value to the configuration. | |
| int | wxGetProfileInt (const wxString &main, const wxString &sub, int default_) const |
| Retrieves an integer value from the configuration. | |
| void | wxWriteProfileString (const wxString &main, const wxString &sub, const wxString &value) const |
| Writes a string to the configuration. | |
| wxString | wxGetProfileString (const wxString &main, const wxString &sub, const wxString &default_) const |
| Retrieves a string from the configuration. | |
| wxStfDoc * | NewChild (const Recording &NewData, const wxStfDoc *Sender, const wxString &title=wxT("\0")) |
| Creates a new child window showing a new document. | |
| void | OnPeakcalcexecMsg (wxStfDoc *actDoc=0) |
| Execute all pending calculations. | |
| void | CleanupDocument (wxStfDoc *pDoc) |
| Destroys the last cursor settings dialog when the last document is closed. | |
| bool | CloseAll () |
| Closes all documents. | |
| bool | OpenFileSeries (const wxArrayString &fNameArray) |
| Opens a series of files. Optionally, files can be put into a single window. | |
| int | GetDocCount () |
| Returns the number of currently opened documents. | |
| void | set_isBars (bool value) |
| Determine whether scale bars or coordinates should be shown. | |
| bool | get_isBars () const |
| Indicates whether scale bars or coordinates are shown. | |
| void | set_isHires (bool value) |
| Determine whether a high or a low resolution should be used for drawing traces. | |
| bool | get_isHires () const |
| Indicates whether a high or a low resolution is used for drawing traces. | |
| wxString | GetVersionString () const |
| Get a formatted version string. | |
| void | OnNewfromselected (wxCommandEvent &event) |
| Open a new window showing all selected traces from all open files. | |
| wxDocManager * | GetDocManager () const |
| Access the document manager. | |
| virtual void | OnInitCmdLine (wxCmdLineParser &parser) |
| virtual bool | OnCmdLineParsed (wxCmdLineParser &parser) |
| bool | OpenFilePy (const wxString &fNameArray) |
| Opens a file in a new window, to be called from Python. | |
| void | OnPythonImport (wxCommandEvent &event) |
| Opens a dialog to import a Python module. | |
The application, derived from wxApp.
This class is used to set and get application-wide properties, implement the windowing system message or event loop, initiate application processing via OnInit, and allow default processing of events not handled by other objects in the application.
| void wxStfApp::CleanupDocument | ( | wxStfDoc * | pDoc | ) |
Destroys the last cursor settings dialog when the last document is closed.
Do not use this function directly. It only needs to be called from wxStfDoc::OnCloseDocument().
| pDoc | Pointer to the document that is being closed. |
| wxStfChildFrame* wxStfApp::CreateChildFrame | ( | wxDocument * | doc, |
| wxView * | view | ||
| ) |
Creates a new child frame.
This is called from view.cpp whenever a child frame is created. If you want to pop up a new frame showing a new document, use NewChild() instead; this function will then be called by the newly created view.
| doc | A pointer to the document that the new child frame should contain. |
| view | A pointer to the view corresponding to the document. |
| void wxStfApp::ErrorMsg | ( | const wxString & | msg | ) | const [inline] |
Displays a message box when an error has occured.
You can use this function from almost anywhere using wxGetApp().ErrorMsg( wxT( "Error abc: xyz" ) );
| msg | The message string to be shown. |
| void wxStfApp::ExceptMsg | ( | const wxString & | msg | ) | const [inline] |
Displays a message box when an exception has occured.
You can use this function from almost anywhere using wxGetApp().ExceptMsg( wxT( "Exception description xyz" ) );
| msg | The message string to be shown. |
| bool wxStfApp::get_directTxtImport | ( | ) | const [inline] |
Indicates whether text files should be imported directly without showing an import settings dialog.
| bool wxStfApp::get_isBars | ( | ) | const [inline] |
Indicates whether scale bars or coordinates are shown.
| bool wxStfApp::get_isHires | ( | ) | const [inline] |
Indicates whether a high or a low resolution is used for drawing traces.
| wxStfDoc* wxStfApp::GetActiveDoc | ( | ) | const |
Retrieves the currently active document.
| wxStfView* wxStfApp::GetActiveView | ( | ) | const |
Sets the currently active document.
| pDoc | A pointer to the currently active document. Retrieves the currently active view. |
| wxStfCursorsDlg* wxStfApp::GetCursorsDialog | ( | ) | const [inline] |
Retrieves the cursor settings dialog.
| int wxStfApp::GetDocCount | ( | ) | [inline] |
Returns the number of currently opened documents.
| wxDocManager* wxStfApp::GetDocManager | ( | ) | const [inline] |
Access the document manager.
| const std::vector< stf::Extension >& wxStfApp::GetExtensionLib | ( | ) | const [inline] |
Retrieves the user-defined extension functions.
| const std::vector<stf::storedFunc>& wxStfApp::GetFuncLib | ( | ) | const [inline] |
Retrieves the functions that are available for least-squares minimisation.
| stf::storedFunc* wxStfApp::GetFuncLibPtr | ( | std::size_t | at | ) | [inline] |
Retrieves a pointer to a function for least-squares minimisation.
| stf::storedFunc* wxStfApp::GetLinFuncPtr | ( | ) | [inline] |
Retrieves a pointer to a function for least-squares minimisation.
| std::vector<stf::SectionPointer> wxStfApp::GetSectionsWithFits | ( | ) | const |
Retrieves all sections with fits.
| const stfio::txtImportSettings& wxStfApp::GetTxtImport | ( | ) | const [inline] |
Retrieves the text import filter settings.
| wxString wxStfApp::GetVersionString | ( | ) | const |
Get a formatted version string.
| void wxStfApp::InfoMsg | ( | const wxString & | msg | ) | const [inline] |
Displays a message box with information.
You can use this function from almost anywhere using wxGetApp().InfoMsg( wxT( "Info xyz" ) );
| msg | The message string to be shown. |
| wxStfDoc* wxStfApp::NewChild | ( | const Recording & | NewData, |
| const wxStfDoc * | Sender, | ||
| const wxString & | title = wxT("\0") |
||
| ) |
Creates a new child window showing a new document.
| NewData | The new data to be shown in the new window. |
| Sender | The document that was at the origin of this new window. |
| title | A title for the new document. |
| virtual int wxStfApp::OnExit | ( | ) | [virtual] |
Exit the application.
Does nothing but calling the base class's wxApp::OnExit().
| virtual bool wxStfApp::OnInit | ( | ) | [virtual] |
Initialise the application.
Initialises the document manager and the file-independent menu items, loads the user-defined extension library and the least-squares function library, parses the command line and attempts to open a file if one was given at program startup by either double-clicking it or as a command-line argument.
| void wxStfApp::OnNewfromselected | ( | wxCommandEvent & | event | ) |
Open a new window showing all selected traces from all open files.
| event | The associated menu event |
| void wxStfApp::OnPeakcalcexecMsg | ( | wxStfDoc * | actDoc = 0 | ) |
Execute all pending calculations.
Whenever settings that have an effect on measurements, such as cursor positions or trace selections, are modified, this function needs to be called to update the results table.
| void wxStfApp::OnPythonImport | ( | wxCommandEvent & | event | ) |
Opens a dialog to import a Python module.
| event | The associated menu event |
| bool wxStfApp::OpenFilePy | ( | const wxString & | fNameArray | ) |
Opens a file in a new window, to be called from Python.
| fNameArray | An array of file names to be opened. |
| bool wxStfApp::OpenFileSeries | ( | const wxArrayString & | fNameArray | ) |
Opens a series of files. Optionally, files can be put into a single window.
| fNameArray | An array of file names to be opened. |
| void wxStfApp::set_directTxtImport | ( | bool | directTxtImport_ | ) | [inline] |
Determines whether text files should be imported directly without showing an import filter settings dialog.
| directTxtImport_ | Set to true if text files should be imported directly, false otherwise. |
| void wxStfApp::set_isBars | ( | bool | value | ) | [inline] |
Determine whether scale bars or coordinates should be shown.
| value | Set to true for scale bars, false for coordinates. |
| void wxStfApp::set_isHires | ( | bool | value | ) | [inline] |
Determine whether a high or a low resolution should be used for drawing traces.
Will attempt to draw at most 50,000 points per trace.
| value | Set to true for high resolution, false for low resolution. |
| void wxStfApp::set_txtImportSettings | ( | const stfio::txtImportSettings & | txtImport_ | ) | [inline] |
Sets the text import filter settings.
| txtImport_ | A struct with the new text import filter settings. |
Retrieves an integer value from the configuration.
| main | The main path within the configuration. |
| sub | The sub-path within the configuration. |
| default_ | The default integer to return if the configuration entry can't be read. |
| wxString wxStfApp::wxGetProfileString | ( | const wxString & | main, |
| const wxString & | sub, | ||
| const wxString & | default_ | ||
| ) | const |
Retrieves a string from the configuration.
| main | The main path within the configuration. |
| sub | The sub-path within the configuration. |
| default_ | The default string to return if the configuration entry can't be read. |
Writes an integer value to the configuration.
| main | The main path within the configuration. |
| sub | The sub-path within the configuration. |
| value | The integer to write to the configuration. |
| void wxStfApp::wxWriteProfileString | ( | const wxString & | main, |
| const wxString & | sub, | ||
| const wxString & | value | ||
| ) | const |
Writes a string to the configuration.
| main | The main path within the configuration. |
| sub | The sub-path within the configuration. |
| value | The string to write to the configuration. |
1.7.4