Stimfit  0.13.15
Public Member Functions

The application, derived from wxApp. More...

#include <app.h>

Inheritance diagram for wxStfApp:
Inheritance graph
[legend]
Collaboration diagram for wxStfApp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxStfApp ()
 Constructor.
virtual bool OnInit ()
 Initialise the application.
virtual int OnExit ()
 Exit the application.
wxStfChildFrameCreateChildFrame (wxDocument *doc, wxView *view)
 Creates a new child frame.
wxStfDocGetActiveDoc () const
 Retrieves the currently active document.
wxStfViewGetActiveView () 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::txtImportSettingsGetTxtImport () 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::storedFuncGetFuncLibPtr (std::size_t at)
 Retrieves a pointer to a function for least-squares minimisation.
stf::storedFuncGetLinFuncPtr ()
 Retrieves a pointer to a function for least-squares minimisation.
const std::vector
< stf::Extension > & 
GetExtensionLib () const
 Retrieves the user-defined extension functions.
wxStfCursorsDlgGetCursorsDialog () const
 Retrieves the cursor settings dialog.
std::vector< stf::SectionPointerGetSectionsWithFits () 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.
wxStfDocNewChild (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.
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.

Detailed Description

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.

Definition at line 231 of file app.h.


Member Function Documentation

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().

Parameters:
pDocPointer to the document that is being closed.

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.

Parameters:
docA pointer to the document that the new child frame should contain.
viewA pointer to the view corresponding to the document.
Returns:
A pointer to the newly created child frame.
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" ) );

Parameters:
msgThe message string to be shown.

Definition at line 283 of file app.h.

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" ) );

Parameters:
msgThe message string to be shown.

Definition at line 292 of file app.h.

bool wxStfApp::get_directTxtImport ( ) const [inline]

Indicates whether text files should be imported directly without showing an import settings dialog.

Returns:
true if text files should be imported directly, false otherwise.

Definition at line 308 of file app.h.

bool wxStfApp::get_isBars ( ) const [inline]

Indicates whether scale bars or coordinates are shown.

Returns:
true for scale bars, false for coordinates.

Definition at line 446 of file app.h.

Retrieves the currently active document.

Returns:
A pointer to the currently active document.

Sets the currently active document.

Parameters:
pDocA pointer to the currently active document. Retrieves the currently active view.
Returns:
A pointer to the currently active view.

Retrieves the cursor settings dialog.

Returns:
A pointer to the cursor settings dialog.

Definition at line 358 of file app.h.

int wxStfApp::GetDocCount ( ) [inline]

Returns the number of currently opened documents.

Returns:
The number of currently opened documents.

Definition at line 436 of file app.h.

wxDocManager* wxStfApp::GetDocManager ( ) const [inline]

Access the document manager.

Returns:
A pointer to the document manager.

Definition at line 461 of file app.h.

const std::vector< stf::Extension >& wxStfApp::GetExtensionLib ( ) const [inline]

Retrieves the user-defined extension functions.

Returns:
A vector containing the user-defined functions.

Definition at line 352 of file app.h.

const std::vector<stf::storedFunc>& wxStfApp::GetFuncLib ( ) const [inline]

Retrieves the functions that are available for least-squares minimisation.

Returns:
A vector containing the available functions.

Definition at line 334 of file app.h.

stf::storedFunc* wxStfApp::GetFuncLibPtr ( std::size_t  at) [inline]

Retrieves a pointer to a function for least-squares minimisation.

Returns:
A vector containing the available functions.

Definition at line 340 of file app.h.

Retrieves a pointer to a function for least-squares minimisation.

Returns:
A vector containing the available functions.

Definition at line 346 of file app.h.

Retrieves all sections with fits.

Returns:
A vector containing pointers to all sections in which fits have been performed

Retrieves the text import filter settings.

Returns:
A struct with the current text import filter settings.

Definition at line 320 of file app.h.

Get a formatted version string.

Returns:
A version string (stimfit x.y.z, release/debug build, date).
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" ) );

Parameters:
msgThe message string to be shown.

Definition at line 301 of file app.h.

wxStfDoc* wxStfApp::NewChild ( const Recording NewData,
const wxStfDoc Sender,
const wxString title = wxT("\0") 
)

Creates a new child window showing a new document.

Parameters:
NewDataThe new data to be shown in the new window.
SenderThe document that was at the origin of this new window.
titleA title for the new document.
Returns:
A pointer to the newly created document.
virtual int wxStfApp::OnExit ( ) [virtual]

Exit the application.

Does nothing but calling the base class's wxApp::OnExit().

Returns:
The return value of 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.

Returns:
true upon successful initialisation, false otherwise.

Open a new window showing all selected traces from all open files.

Parameters:
eventThe 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.

Opens a dialog to import a Python module.

Parameters:
eventThe associated menu event
bool wxStfApp::OpenFilePy ( const wxString fNameArray)

Opens a file in a new window, to be called from Python.

Parameters:
fNameArrayAn array of file names to be opened.
Returns:
true upon successful opening, false otherwise.
bool wxStfApp::OpenFileSeries ( const wxArrayString &  fNameArray)

Opens a series of files. Optionally, files can be put into a single window.

Parameters:
fNameArrayAn array of file names to be opened.
Returns:
true upon successful opening of all files, false otherwise.
void wxStfApp::set_directTxtImport ( bool  directTxtImport_) [inline]

Determines whether text files should be imported directly without showing an import filter settings dialog.

Parameters:
directTxtImport_Set to true if text files should be imported directly, false otherwise.

Definition at line 313 of file app.h.

void wxStfApp::set_isBars ( bool  value) [inline]

Determine whether scale bars or coordinates should be shown.

Parameters:
valueSet to true for scale bars, false for coordinates.

Definition at line 441 of file app.h.

void wxStfApp::set_txtImportSettings ( const stfio::txtImportSettings txtImport_) [inline]

Sets the text import filter settings.

Parameters:
txtImport_A struct with the new text import filter settings.

Definition at line 327 of file app.h.

int wxStfApp::wxGetProfileInt ( const wxString main,
const wxString sub,
int  default_ 
) const

Retrieves an integer value from the configuration.

Parameters:
mainThe main path within the configuration.
subThe sub-path within the configuration.
default_The default integer to return if the configuration entry can't be read.
Returns:
The integer that is stored in /main/sub, or default_ if the entry couldn't be read.
wxString wxStfApp::wxGetProfileString ( const wxString main,
const wxString sub,
const wxString default_ 
) const

Retrieves a string from the configuration.

Parameters:
mainThe main path within the configuration.
subThe sub-path within the configuration.
default_The default string to return if the configuration entry can't be read.
Returns:
The string that is stored in /main/sub, or default_ if the entry couldn't be read.
void wxStfApp::wxWriteProfileInt ( const wxString main,
const wxString sub,
int  value 
) const

Writes an integer value to the configuration.

Parameters:
mainThe main path within the configuration.
subThe sub-path within the configuration.
valueThe 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.

Parameters:
mainThe main path within the configuration.
subThe sub-path within the configuration.
valueThe string to write to the configuration.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines