cxWidgets 1.0
cxApp.h
Go to the documentation of this file.
1// Copyright (c) 2026 E. Oulashin
2#ifndef __CXAPP_H__
3#define __CXAPP_H__
4
5/*
6 *
7 * cxApp.h - application framework
8 *
9 * Copyright (c) 2005-2007 Michael H. Kinney
10 *
11 */
12
13#include "cxObject.h"
14#include "cxFrame.h"
15#include <memory>
16
17namespace cx {
18
23class cxApp : public cxObject
24{
25 public:
26 cxApp();
27
28 virtual ~cxApp();
29
35 virtual long mainLoop();
36
42 virtual long onRun();
43
49 virtual long run();
50
56 virtual long onInit();
57
63 virtual long onExit();
64
73 virtual std::string cxTypeStr() const override;
74
75 private:
76 std::shared_ptr<cxFrame> mAppFrame; // The application's frame
77};
78
79} // namespace cx
80
81#endif
Holds application setup & exit logic, as well as the application's main frame.
Definition cxApp.h:24
virtual long mainLoop()
Enters the main loop.
Definition cxApp.cpp:15
cxApp()
Definition cxApp.cpp:7
virtual ~cxApp()
Definition cxApp.cpp:11
virtual long run()
Synonym for onRun().
Definition cxApp.cpp:25
virtual long onInit()
Application initialization & startup commands will go here.
Definition cxApp.cpp:30
virtual long onExit()
Things to be done upon applicatoin exit will go here.
Definition cxApp.cpp:35
virtual std::string cxTypeStr() const override
Returns the name of the cxWidgets class. This is overridden.
Definition cxApp.cpp:40
virtual long onRun()
This virtual function is where the execution of a program written with cxWidgets starts....
Definition cxApp.cpp:20
The base class for windowing classes in the cxWidgets.
Definition cxObject.h:41
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all it...
Definition cxApp.cpp:5