wex  v20.04.0
Public Member Functions | List of all members
wex::app Class Reference

Offers the application, with lib specific init and exit. More...

#include <wex/app.h>

Inherits wxApp.

Public Member Functions

void OnAssertFailure (const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg) override
 Virtual interface. More...
 
bool OnInit () override
 Constructs the config, initializes the locale, loads the VCS file. More...
 
int OnExit () override
 Deletes all global objects and cleans up things if necessary. More...
 
const auto & get_catalog_dir () const
 Other methods. More...
 
const auto & get_locale () const
 Returns the locale.
 

Detailed Description

Offers the application, with lib specific init and exit.

It also keeps the locale and the catalog dir. Your application should be derived from this class.

Member Function Documentation

◆ get_catalog_dir()

const auto& wex::app::get_catalog_dir ( ) const
inline

Other methods.

Returns the catalog dir.

◆ OnAssertFailure()

void wex::app::OnAssertFailure ( const wxChar *  file,
int  line,
const wxChar *  func,
const wxChar *  cond,
const wxChar *  msg 
)
override

Virtual interface.

This function is called when an assert failure occurs, i.e. the condition specified in assert() macro evaluated to false.

◆ OnExit()

int wex::app::OnExit ( )
override

Deletes all global objects and cleans up things if necessary.

You should normally don't need to override it.

◆ OnInit()

bool wex::app::OnInit ( )
override

Constructs the config, initializes the locale, loads the VCS file.

In your own OnInit first set the app name, as it uses this name for the config, and then call this base class method.