Ember
Loading...
Searching...
No Matches
App Class Reference

Main application class for EmberForge. More...

#include <App.h>

Inheritance diagram for App:

Public Member Functions

 App ()
 Default constructor.
bool OnInit () override
 Application initialization.
int OnExit () override
 Application cleanup.

Private Attributes

MainFramem_frame
 Pointer to main frame window.
int m_screenWidth
 Screen width at startup.
int m_screenHeight
 Screen height at startup.

Detailed Description

Main application class for EmberForge.

App is the wxWidgets application entry point. It handles:

  • Application initialization and shutdown
  • Creating the main frame window
  • Loading user preferences
  • Setting up logging

The application lifecycle:

  1. wxWidgets calls OnInit() at startup
  2. OnInit() creates MainFrame and shows it
  3. Event loop runs until window closes
  4. OnExit() performs cleanup

Definition at line 32 of file App.h.

Constructor & Destructor Documentation

◆ App()

App::App ( )
inline

Default constructor.

Initializes member variables to safe defaults.

Definition at line 39 of file App.h.

Member Function Documentation

◆ OnExit()

int App::OnExit ( )
override

Application cleanup.

Returns
Exit code (0 for success)

Called by wxWidgets when the application is shutting down. Saves preferences and performs cleanup.

Definition at line 49 of file App.cpp.

◆ OnInit()

bool App::OnInit ( )
override

Application initialization.

Returns
true if initialization succeeded, false to abort

Called by wxWidgets when the application starts. Creates the main frame window, loads preferences, and initializes subsystems.

Definition at line 11 of file App.cpp.

Member Data Documentation

◆ m_frame

MainFrame* App::m_frame
private

Pointer to main frame window.

Definition at line 60 of file App.h.

◆ m_screenHeight

int App::m_screenHeight
private

Screen height at startup.

Definition at line 62 of file App.h.

◆ m_screenWidth

int App::m_screenWidth
private

Screen width at startup.

Definition at line 61 of file App.h.


The documentation for this class was generated from the following files: