void rigoMainFrame::CreateControls() { ////@begin rigoMainFrame content construction // Generated by DialogBlocks, 07/18/06 21:14:36 (Personal Edition) rigoMainFrame* itemFrame1 = this; wxMenuBar* menuBar = new wxMenuBar; wxMenu* itemMenu3 = new wxMenu; { wxMenuItem* menuItem = new wxMenuItem(itemMenu3, New, _("New"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\page_attach.png"))); menuItem->SetBitmap(bitmap); itemMenu3->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu3, Save, _("Save"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\disk.png"))); menuItem->SetBitmap(bitmap); itemMenu3->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu3, Quit, _("Quit"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\door_in.png"))); menuItem->SetBitmap(bitmap); itemMenu3->Append(menuItem); } menuBar->Append(itemMenu3, _("File")); wxMenu* itemMenu7 = new wxMenu; { wxMenuItem* menuItem = new wxMenuItem(itemMenu7, Cut, _("Cut"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\cut_red.png"))); menuItem->SetBitmap(bitmap); itemMenu7->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu7, Copy, _("Copy"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\page_refresh.png"))); menuItem->SetBitmap(bitmap); itemMenu7->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu7, Profile, _("Profile"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\user_edit.png"))); menuItem->SetBitmap(bitmap); itemMenu7->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu7, Export, _("Export"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\wrench_orange.png"))); menuItem->SetBitmap(bitmap); itemMenu7->Append(menuItem); } menuBar->Append(itemMenu7, _("&Edit")); wxMenu* itemMenu12 = new wxMenu; { wxMenuItem* menuItem = new wxMenuItem(itemMenu12, NewSource, _("New Source"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\book_edit.png"))); menuItem->SetBitmap(bitmap); itemMenu12->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu12, NewQuote, _("Add Quotation"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\comment_add.png"))); menuItem->SetBitmap(bitmap); itemMenu12->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(itemMenu12, NewAnnotation, _("Add Annotation"), _T(""), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("Art\\email_add.png"))); menuItem->SetBitmap(bitmap); itemMenu12->Append(menuItem); } menuBar->Append(itemMenu12, _("Tools")); itemFrame1->SetMenuBar(menuBar); wxToolBar* itemToolBar16 = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, Rigo_Toolbar ); itemToolBar16->SetMargins(5, 1); itemToolBar16->SetToolBitmapSize(wxSize(16, 16)); wxBitmap itemtool17Bitmap(itemFrame1->GetBitmapResource(wxT("Art\\folder_page_white.png"))); itemToolBar16->AddTool(Open, _T(""), itemtool17Bitmap, _("Open"), wxITEM_NORMAL); wxBitmap itemtool18Bitmap(itemFrame1->GetBitmapResource(wxT("Art\\wrench_orange.png"))); itemToolBar16->AddTool(Export, _T(""), itemtool18Bitmap, _("Export"), wxITEM_NORMAL); wxBitmap itemtool19Bitmap(itemFrame1->GetBitmapResource(wxT("Art\\printer.png"))); itemToolBar16->AddTool(Print, _T(""), itemtool19Bitmap, _("Print"), wxITEM_NORMAL); wxBitmap itemtool20Bitmap(itemFrame1->GetBitmapResource(wxT("Art\\disk.png"))); itemToolBar16->AddTool(Save, _T(""), itemtool20Bitmap, _("Save"), wxITEM_NORMAL); itemToolBar16->AddSeparator(); wxBitmap itemtool22Bitmap(itemFrame1->GetBitmapResource(wxT("Art\\page_edit.png"))); itemToolBar16->AddTool(Writebiblo, _T(""), itemtool22Bitmap, _("Biblography"), wxITEM_NORMAL); /*wxString itemComboBox23Strings[] = { "Source2", "Source 3" };*/ sourceList.Add(wxT("No Sources")); wxComboBox* itemComboBox23 = new wxComboBox( itemToolBar16, ID_COMBOBOX, wxT("No Sources"), wxDefaultPosition, wxDefaultSize, sourceList, wxCB_DROPDOWN); //wxComboBox* itemComboBox23 = new wxComboBox( itemToolBar16, ID_COMBOBOX, "Source1", wxDefaultPosition, wxDefaultSize, 2, itemComboBox23Strings, wxCB_DROPDOWN ); //itemComboBox23->SetStringSelection("Source1"); itemToolBar16->AddControl(itemComboBox23); itemToolBar16->Realize(); itemFrame1->SetToolBar(itemToolBar16); wxPanel* itemPanel24 = new wxPanel( itemFrame1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); wxGridSizer* itemGridSizer25 = new wxGridSizer(1, 1, 0, 0); itemPanel24->SetSizer(itemGridSizer25); wxNotebook* itemNotebook26 = new wxNotebook( itemPanel24, ID_NOTEBOOK, wxDefaultPosition, wxSize(100, 100), wxNB_TOP ); itemGridSizer25->Add(itemNotebook26, 0, wxGROW|wxGROW|wxALL, 0); wxStatusBar* itemStatusBar27 = new wxStatusBar( itemFrame1, ID_STATUSBAR, wxST_SIZEGRIP|wxNO_BORDER ); itemStatusBar27->SetFieldsCount(2); itemFrame1->SetStatusBar(itemStatusBar27); ////@end rigoMainFrame content construction }
void frmMDFEditor::CreateControls() { frmMDFEditor* itemFrame1 = this; wxMenuBar* menuBar = new wxMenuBar; wxMenu* itemMenu3 = new wxMenu; itemMenu3->Append( ID_MENUITEM_NEW, _( "Create New MDF File" ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->AppendSeparator(); itemMenu3->Append( ID_MENUITEM_OPEN, _( "Open MDF file..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->Append( ID_MENUITEM_SAVE, _( "Save MDF File..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->AppendSeparator(); itemMenu3->Append( ID_MENUITEM_DOWNLOAD, _( "Download MDF file..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->Append( ID_MENUITEM_UPLOAD, _( "Upload MDF file..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu3->AppendSeparator(); itemMenu3->Append( ID_MENUITEM_EXIT, _( "Exit" ), wxEmptyString, wxITEM_NORMAL ); menuBar->Append( itemMenu3, _( "File" ) ); wxMenu* itemMenu13 = new wxMenu; itemMenu13->Append( ID_MENUITEM_ADD, _( "Add MDF Item..." ), wxEmptyString, wxITEM_NORMAL ); itemMenu13->Append( ID_MENUITEM_REMOVE, _( "Remove MDF Item..." ), wxEmptyString, wxITEM_NORMAL ); menuBar->Append( itemMenu13, _( "Edit" ) ); itemFrame1->SetMenuBar( menuBar ); wxPanel* itemPanel16 = new wxPanel; itemPanel16->Create( itemFrame1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL ); wxBoxSizer* itemBoxSizer17 = new wxBoxSizer( wxVERTICAL ); itemPanel16->SetSizer( itemBoxSizer17 ); wxToolBar* itemToolBar18 = new wxToolBar; itemToolBar18->Create( itemPanel16, ID_TOOLBAR3, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_HORIZONTAL ); wxBitmap itemtool19Bitmap( itemFrame1->GetBitmapResource( wxT( "deffile.xpm" ) ) ); wxBitmap itemtool19BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_NEW, wxEmptyString, itemtool19Bitmap, itemtool19BitmapDisabled, wxITEM_NORMAL, _( "Create new MDF file" ), wxEmptyString ); wxBitmap itemtool20Bitmap( itemFrame1->GetBitmapResource( wxT( "open.xpm" ) ) ); wxBitmap itemtool20BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_LOAD, wxEmptyString, itemtool20Bitmap, itemtool20BitmapDisabled, wxITEM_NORMAL, _( "Load MDF file" ), wxEmptyString ); wxBitmap itemtool21Bitmap( itemFrame1->GetBitmapResource( wxT( "save.xpm" ) ) ); wxBitmap itemtool21BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_SAVE, wxEmptyString, itemtool21Bitmap, itemtool21BitmapDisabled, wxITEM_NORMAL, _( "Save MDF file" ), wxEmptyString ); wxBitmap itemtool22Bitmap( itemFrame1->GetBitmapResource( wxT( "filesaveas.xpm" ) ) ); wxBitmap itemtool22BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_UPLOAD, wxEmptyString, itemtool22Bitmap, itemtool22BitmapDisabled, wxITEM_NORMAL, _( "Upload MDF file" ), wxEmptyString ); wxBitmap itemtool23Bitmap( itemFrame1->GetBitmapResource( wxT( "redo.xpm" ) ) ); wxBitmap itemtool23BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_DOWNLOAD, wxEmptyString, itemtool23Bitmap, itemtool23BitmapDisabled, wxITEM_NORMAL, _( "Upload MDF file" ), wxEmptyString ); itemToolBar18->AddSeparator(); wxBitmap itemtool25Bitmap( itemFrame1->GetBitmapResource( wxT( "New1.xpm" ) ) ); wxBitmap itemtool25BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_ADD_ITEM, wxEmptyString, itemtool25Bitmap, itemtool25BitmapDisabled, wxITEM_NORMAL, _( "Add MDF item" ), wxEmptyString ); wxBitmap itemtool26Bitmap( itemFrame1->GetBitmapResource( wxT( "delete.xpm" ) ) ); wxBitmap itemtool26BitmapDisabled; itemToolBar18->AddTool( ID_TOOL_REMOVE_ITEM, wxEmptyString, itemtool26Bitmap, itemtool26BitmapDisabled, wxITEM_NORMAL, _( "Remove MDF item" ), wxEmptyString ); itemToolBar18->Realize(); itemBoxSizer17->Add( itemToolBar18, 0, wxGROW | wxALL, 5 ); m_mdfTree = new wxTreeCtrl; m_mdfTree->Create( itemPanel16, ID_TREECTRL, wxDefaultPosition, wxSize( 400, 300 ), wxTR_HAS_BUTTONS | wxTR_FULL_ROW_HIGHLIGHT | wxTR_LINES_AT_ROOT | wxTR_ROW_LINES | wxTR_SINGLE ); itemBoxSizer17->Add( m_mdfTree, 0, wxGROW | wxALL, 2 ); m_htmlInfoWnd = new wxHtmlWindow; m_htmlInfoWnd->Create( itemPanel16, ID_HTMLWINDOW2, wxDefaultPosition, wxSize( 200, 150 ), wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER | wxHSCROLL | wxVSCROLL ); m_htmlInfoWnd->SetPage( _( "<html><h4>No data</h4></html>" ) ); itemBoxSizer17->Add( m_htmlInfoWnd, 0, wxGROW | wxALL, 5 ); // Connect events and objects m_mdfTree->Connect( ID_TREECTRL, wxEVT_LEFT_DOWN, wxMouseEventHandler( frmMDFEditor::OnLeftDown ), NULL, this ); m_mdfTree->Connect( ID_TREECTRL, wxEVT_LEFT_DCLICK, wxMouseEventHandler( frmMDFEditor::OnLeftDClick ), NULL, this ); wxImageList* itemImageList = new wxImageList( 16, 16, true, 5 ); { wxIcon Icon0( Home_xpm ); itemImageList->Add( Icon0 ); wxIcon Icon1( Folder_Add_xpm ); itemImageList->Add( Icon1 ); wxIcon Icon2( Info_xpm ); itemImageList->Add( Icon2 ); wxIcon Icon3( copy_xpm ); itemImageList->Add( Icon3 ); wxIcon Icon4( copy_xpm ); itemImageList->Add( Icon4 ); } m_mdfTree->AssignImageList( itemImageList ); addDefaultContent(); }