OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | List of all members
HDBEditorAboutDialog Class Reference

#include <HDBEditorAboutDialog.hh>

Inheritance diagram for HDBEditorAboutDialog:
Inheritance graph
Collaboration diagram for HDBEditorAboutDialog:
Collaboration graph

Public Member Functions

 HDBEditorAboutDialog (wxWindow *parent)
 
virtual ~HDBEditorAboutDialog ()
 

Private Types

enum  { ID_TEXT_PROGRAM_NAME = 10000 , ID_TEXT_PROGRAM_VERSION , ID_TEXT_PROGRAM_COPYRIGHT , ID_LINE }
 Widget IDs. More...
 

Private Member Functions

wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 

Detailed Description

About dialog for HDBEditor.

Definition at line 42 of file HDBEditorAboutDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Widget IDs.

Enumerator
ID_TEXT_PROGRAM_NAME 
ID_TEXT_PROGRAM_VERSION 
ID_TEXT_PROGRAM_COPYRIGHT 
ID_LINE 

Definition at line 51 of file HDBEditorAboutDialog.hh.

Constructor & Destructor Documentation

◆ HDBEditorAboutDialog()

HDBEditorAboutDialog::HDBEditorAboutDialog ( wxWindow *  parent)

The Constructor.

Parameters
parentParent window of the dialog.

Definition at line 43 of file HDBEditorAboutDialog.cc.

43 :
44 wxDialog(parent, -1, _T("About HDB Editor"), wxDefaultPosition) {
45
46 createContents(this, true, true);
47 dynamic_cast<wxStaticText*>(FindWindow(ID_TEXT_PROGRAM_VERSION))->SetLabel(
48 _T("OpenASIP ") + WxConversion::toWxString(VERSION));
49}
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
static wxString toWxString(const std::string &source)

References createContents(), ID_TEXT_PROGRAM_VERSION, and WxConversion::toWxString().

Here is the call graph for this function:

◆ ~HDBEditorAboutDialog()

HDBEditorAboutDialog::~HDBEditorAboutDialog ( )
virtual

The Destructor.

Definition at line 54 of file HDBEditorAboutDialog.cc.

54 {
55}

Member Function Documentation

◆ createContents()

wxSizer * HDBEditorAboutDialog::createContents ( wxWindow *  parent,
bool  call_fit,
bool  set_sizer 
)
private

Creates contents of the dialog window. Code generated by wxDesigner.

Parameters
parentParent dialog of the contents.
call_fitIf true, fits sizer in dialog window.
set_sizerIf true, sets sizer as dialog's sizer.
Returns
Top level sizer of the contents.

Definition at line 67 of file HDBEditorAboutDialog.cc.

68 {
69
70 wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
71
72 item0->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
73
74 wxStaticText *item1 = new wxStaticText( parent, ID_TEXT_PROGRAM_NAME, wxT("HDB Editor"), wxDefaultPosition, wxDefaultSize, 0 );
75 item1->SetFont( wxFont( 25, wxROMAN, wxNORMAL, wxNORMAL ) );
76 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
77
78 wxStaticText *item2 = new wxStaticText( parent, ID_TEXT_PROGRAM_VERSION, wxT("Version ?.??"), wxDefaultPosition, wxDefaultSize, 0 );
79 item0->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
80
81 wxStaticText *item3 = new wxStaticText( parent, ID_TEXT_PROGRAM_COPYRIGHT, HDBEditorConstants::HDB_EDITOR_COPYRIGHT,
82 wxDefaultPosition, wxDefaultSize, 0 );
83 item0->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
84
85 item0->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
86
87 wxStaticLine *item4 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(200,-1), wxLI_HORIZONTAL );
88 item0->Add( item4, 0, wxGROW|wxALL, 5 );
89
90 wxButton *item5 = new wxButton( parent, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
91 item0->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
92
93 if (set_sizer)
94 {
95 parent->SetSizer( item0 );
96 if (call_fit)
97 item0->SetSizeHints( parent );
98 }
99
100 return item0;
101}
static const wxString HDB_EDITOR_COPYRIGHT
Copyright string.

References HDBEditorConstants::HDB_EDITOR_COPYRIGHT, ID_LINE, ID_TEXT_PROGRAM_COPYRIGHT, ID_TEXT_PROGRAM_NAME, and ID_TEXT_PROGRAM_VERSION.

Referenced by HDBEditorAboutDialog().


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