- // We will hold one ctrlmaskout during the whole life time of the main frame
- m_maskout = new CtrlMaskOut();
-
- // At the begining, we are not specifying the rect region
- capturingRect = false;
-
- // Do some further customization on some controls generated by wxFormBuilder
- InitFBControls();
-#if SCREENSHOTGEN_USE_AUI
- // Somehow it will be very small after I move to Aui
- SetSize(600, 600);
- // Maximize(true);
-#endif
-}
-
-ScreenshotFrame::~ScreenshotFrame()
-{
- delete m_maskout;
-}
-
-/*
- Do some further customization on some controls generated by wxFormBuilder.
-
- wxFormBuilder does not allow customizations on some controls;
- e.g. you cannot load a richtext file in a wxRichtextCtrl during initialization.
-
- Those customizations will be done here.
-
-
- NB: under wxGTK for the radio button "unchecked" to be unchecked, it's
- important to put the wxRB_GROUP style on the first wxRadioButton
- (the one "checked") and no flags on the second one.
-*/
-void ScreenshotFrame::InitFBControls()
-{
- // For some reason, wxFormBuilder does not set the scrollbar range
- m_scrollBar1->SetScrollbar(50, 1, 100, 1);
-
- // Do the default selection for wxComboBox
- m_comboBox1->Select(0);
-
- // To look better under gtk
-#ifdef __WXGTK__
- m_comboBox1->Delete(4);
-#endif
-
- // Add a root and some nodes for wxTreeCtrl
- wxTreeItemId root = m_treeCtrl1->AddRoot(_("wxTreeCtrl"));
- m_treeCtrl1->AppendItem(root, _("Node1"));
- wxTreeItemId node2 = m_treeCtrl1->AppendItem(root, _("Node2"));
- m_treeCtrl1->AppendItem(node2, _("Node3"));
- m_treeCtrl1->ExpandAll();
-
- // Add items into wxListCtrl
- m_listCtrl1->InsertColumn(0, "Names");
- m_listCtrl1->InsertColumn(1, "Values");
- for(long index = 0; index < 5; index++) {
- m_listCtrl1->InsertItem( index, wxString::Format(_("Item%d"),index));
- m_listCtrl1->SetItem(index, 1, wxString::Format("%d", index));
- }
-
- // Check the first item in wxCheckListBox
- m_checkList1->Check(0);
-
- // Load richtext.xml into wxRichtextCtrl
- m_richText1->LoadFile(_T("richtext.xml"));
- //m_richText1->ShowPosition(335);
-
- // select first page in the main notebook ctrl
- m_notebook1->ChangeSelection(0);
-