-
Notifications
You must be signed in to change notification settings - Fork 6
/
MainFrame.h
53 lines (40 loc) · 1.17 KB
/
MainFrame.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* MainFrame.h
* Author : Umer Farooq
*/
#ifndef MAINFRAME_H_
#define MAINFRAME_H_
#include <wx/wx.h>
#include <wx/xrc/xmlres.h>
#include "Converter.h"
/*
* This class controls all the interactions for UI contained in xrc/MainFrame.xrc
* it is a controller class for xrc/MainFrame.xrc
*/
class MainFrame: public wxFrame {
public:
MainFrame(wxWindow* parent);
//Must be protected
protected:
wxButton* ConvertButton;
wxTextCtrl* TextControl;
wxMenuItem* MenuItemITU; //MenuItem Inpage To Unicode
wxMenuItem* MenuItemUTI; //MenuItem Unicode to Inpage
private:
const size_t INPAGE_TO_URDU_UNICODE = 1;
const size_t URDU_UNICODE_TO_INPAGE = 2;
size_t ConvertionMode;
void SetConvertionMode(const size_t&);
size_t GetConvertionMode() const;
Converter converter;
const size_t CHARACTER_LIMIT = 10000;
private:
// Event handlers (these functions should _not_ be virtual)
void OnConvert(wxCommandEvent& event);
void OnMenuItemITUSelect(wxCommandEvent& event);
void OnMenuItemUTISelect(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
// Any class wishing to process wxWidgets events must use this macro
wxDECLARE_EVENT_TABLE();
};
#endif /* MAINFRAME_H_ */