LXRAD 0.7

clxrad.h
Go to the documentation of this file.
1/* ########################################################################
2
3 LXRAD - GUI for X programing
4
5 ########################################################################
6
7 Copyright (c) : 2001-2018 Luis Claudio Gamboa Lopes
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 For e-mail suggestions : lcgamboa@yahoo.com
24 ######################################################################## */
25
26
27//Constants definitions
28
35#ifndef CLXRAD
36#define CLXRAD
37
38
39#ifndef _GNU_SOURCE
40#define _GNU_SOURCE
41#endif
42#ifndef _THREAD_SAFE
43#define _THREAD_SAFE
44
45#undef _MSTRING
46
47#define lxString wxString
48
49
50//c++ headers
51 using namespace std;
52#include<iostream>
53#include<fstream>
54#include<string>
55#include<list>
56#endif
57
58//c headers
59#include<stdio.h>
60#include<stdlib.h>
61#include<string.h>
62#include<ctype.h>
63
64
65// For compilers that support precompilation, includes "wx/wx.h".
66#include "wx/wxprec.h"
67
68#ifdef __BORLANDC__
69 #pragma hdrstop
70#endif
71
72 // for all others, include the necessary headers (this file is usually all you
73 // // need because it includes almost all "standard" wxWidgets headers)
74#ifndef WX_PRECOMP
75 #include "wx/wx.h"
76 #include "wx/textfile.h"
77 #include "wx/sound.h"
78 #include "wx/filename.h"
79#endif
80
81#ifndef uint
82#define uint unsigned int
83#endif
84
85
86#include"mstring.h"
87
88
89#define Initialize IMPLEMENT_APP(CApplication);bool CApplication::OnInit(){Application=this;wxInitAllImageHandlers();Aargc=argc;Aargv=argv;OnInit_();return 1;};bool CApplication::OnInit_()
90
91 enum lxevent
92{
93lxEVT_MOTION,
94lxEVT_KEY_DOWN,
95lxEVT_KEY_UP,
96lxEVT_LEFT_DOWN,
97lxEVT_LEFT_UP,
98lxEVT_LEFT_DCLICK,
99lxEVT_RIGHT_DOWN,
100lxEVT_RIGHT_UP,
101lxEVT_RIGHT_DCLICK,
102lxEVT_ENTER_WINDOW,
103lxEVT_LEAVE_WINDOW,
104lxEVT_PAINT,
105lxEVT_DESTROY,
106lxEVT_MAXIMIZE,
107lxEVT_SHOW,
108lxEVT_SET_FOCUS,
109lxEVT_KILL_FOCUS,
110lxEVT_SIZE,
111lxEVT_CLOSE_WINDOW,
112lxEVT_COMMAND_CHECKBOX_CLICKED,
113lxEVT_COMBOBOX,
114lxEVT_COMMAND_LISTBOX_SELECTED,
115lxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
116lxEVT_COMMAND_MENU_SELECTED,
117lxEVT_TIMER,
118lxEVT_COMMAND_TREE_ITEM_ACTIVATED,
119lxEVT_SCROLL_CHANGED,
120lxEVT_HTML_LINK_CLICKED,
121lxEVT_GRID_SELECT_CELL,
122lxEVT_GRID_CELL_LEFT_CLICK,
123lxEVT_GRID_CELL_RIGHT_CLICK,
124lxEVT_THREAD_END,
125lxEVT_SPINCTRL,
126lxEVT_SPINCTRLDOUBLE,
127lxEVT_TOGGLEBUTTON,
128lxEVT_SCROLL_THUMBTRACK,
129lxEVT_MOUSEWHEEL,
130lxEVT_DROP_FILES
131};
132
133#define EVMAX 50
134#define SIGMAX 50
135#define DOUBLECLICKTIME 400
136
137#define EVMOUSEMOVE (void(CControl::*)(CControl*,const uint,const uint,const uint,const uint))
138#define EVMOUSEBUTTONPRESS (void(CControl::*)(CControl*,const uint,const uint,const uint,const uint))
139#define EVMOUSEBUTTONRELEASE (void(CControl::*)(CControl*,const uint,const uint,const uint,const uint))
140#define EVMOUSEBUTTONCLICK (void(CControl::*)(CControl*,const uint,const uint,const uint,const uint))
141#define EVMOUSEBUTTONDOUBLECLICK (void(CControl::*)(CControl*,const uint,const uint,const uint,const uint))
142#define EVKEYBOARDPRESS (void(CControl::*)(CControl*,const uint,const uint,const uint))
143#define EVKEYBOARDRELEASE (void(CControl::*)(CControl*,const uint,const uint,const uint))
144#define EVPOINTERIN (void(CControl::*)(CControl*))
145#define EVPOINTEROUT (void(CControl::*)(CControl*))
146#define EVONDRAW (void(CControl::*)(CControl*))
147#define EVONFOCUSIN (void(CControl::*)(CControl*))
148#define EVONFOCUSOUT (void(CControl::*)(CControl*))
149#define EVMOUSEWHEEL (void(CControl::*)(CControl*,const int))
150
151#define EVONCHECKBOX (void(CControl::*)(CControl*))
152#define EVONCOMBOCHANGE (void(CControl::*)(CControl*))
153#define EVLISTSELECT (void(CControl::*)(CControl*))
154#define EVLISTDOUBLECLICK (void(CControl::*)(CControl*))
155#define EVONTIME (void(CControl::*)(CControl*))
156#define EVFILELISTSELECTFILE (void(CControl::*)(CControl*))
157#define EVFILELISTSELECTDIR (void(CControl::*)(CControl*))
158#define EVMENUACTIVE (void(CControl::*)(CControl*))
159#define EVONCHANGEPOSITION (void(CControl::*)(CControl*))
160
161#define EVONGRIDCELLLEFTCLICK (void(CControl::*)(CControl*))
162
163#define EVTHREADRUN (void(CControl::*)(CControl*))
164#define EVTHREADEND (void(CControl::*)(CControl*))
165
166#define EVONCHANGESPIN (void(CControl::*)(CControl*))
167#define EVONCHANGESPINDOUBLE (void(CControl::*)(CControl*))
168
169#define EVONTOGGLEBUTTON (void(CControl::*)(CControl*))
170
171#define EVONCLOSE (void(CControl::*)(const int))
172#define EVONDROPFILE (void(CControl::*)(CControl*,const lxString fname))
173
174
175#define CA_LEFT 1
176#define CA_RIGHT 2
177#define CA_CENTER 3
178#define CA_FILL 4
179 typedef int CAlign;
180
181 class CApplication;
182 extern CApplication *Application;
183
184#endif
CApplication
Application class.
Definition: capplication.h:49
mstring.h