コード例 #1
0
 /**
  * Initializes a new instance of the MyFrame1 class.
  * @param type $parent
  */
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "Menu", wxDefaultPosition, new wxSize(230, 300), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_SCROLLBAR));
     $gSizer1 = new wxGridSizer(9, 1, 0, 0);
     $gSizer2 = new wxGridSizer(1, 1, 0, 0);
     $gSizer1->Add($gSizer2, 1, wxEXPAND, 5);
     $this->m_button1 = new wxButton($this, wxID_ANY, "People", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer1->Add($this->m_button1, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer3 = new wxGridSizer(1, 1, 0, 0);
     $gSizer1->Add($gSizer3, 1, wxEXPAND, 5);
     $this->m_button2 = new wxButton($this, wxID_ANY, "Relationships", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer1->Add($this->m_button2, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer4 = new wxGridSizer(1, 1, 0, 0);
     $gSizer1->Add($gSizer4, 1, wxEXPAND, 5);
     $this->m_button3 = new wxButton($this, wxID_ANY, "Relations", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer1->Add($this->m_button3, 1, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL, 5);
     $gSizer5 = new wxGridSizer(1, 1, 0, 0);
     $gSizer1->Add($gSizer5, 1, wxEXPAND, 5);
     $this->m_button4 = new wxButton($this, wxID_ANY, "Exit", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer1->Add($this->m_button4, 1, wxALL | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL, 5);
     $gSizer6 = new wxGridSizer(1, 1, 0, 0);
     $gSizer1->Add($gSizer6, 1, wxEXPAND, 5);
     $this->SetSizer($gSizer1);
     $this->Layout();
     $this->Centre(wxBOTH);
     // Connect Events
     $this->m_button1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button1OnButtonClick"));
     $this->m_button2->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button2OnButtonClick"));
     $this->m_button3->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button3OnButtonClick"));
     $this->m_button4->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button4OnButtonClick"));
 }
コード例 #2
0
ファイル: selector.php プロジェクト: phpsong/wxphp
 function __construct()
 {
     parent::__construct(null, null, "wxPHP Classes Selector, v0.2", new wxPoint(0, 0), new wxSize(600, 400));
     $this->SetIcon(new wxIcon("sample.xpm", wxBITMAP_TYPE_XPM));
     $this->sz = new wxBoxSizer(wxHORIZONTAL);
     $sw = new wxSplitterWindow($this, -1, new wxPoint(0, 0), new wxSize(0, 0), wxSP_NO_XP_THEME);
     $leftPanel = new wxPanel($sw);
     $rightPanel = new wxPanel($sw);
     $this->leftSizer = new wxBoxSizer(wxVERTICAL);
     $txtAutoCompletion = new wxTextCtrl($leftPanel, wxID_ANY);
     $tree = new wxTreeCtrl($leftPanel, -1);
     $this->leftSizer->Add($txtAutoCompletion, 0, wxEXPAND | wxALL);
     $this->leftSizer->Add($tree, 1, wxEXPAND | wxALL);
     $leftPanel->SetSizer($this->leftSizer);
     $this->sz2 = new wxBoxSizer(wxVERTICAL);
     $lstMethods = new wxCheckListBox();
     $lstMethods->Create($rightPanel, -1);
     $lstImplements = new wxCheckListBox();
     $lstImplements->Create($rightPanel, -1);
     $lstMethods->Connect(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, array($this, "onMethodChecked"));
     $lstImplements->Connect(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, array($this, "onParentChecked"));
     $this->sz2->Add($lstImplements, 1, wxEXPAND | wxALL);
     $this->sz2->Add($lstMethods, 1, wxEXPAND | wxALL);
     $rightPanel->SetSizer($this->sz2);
     $this->lstMethods = $lstMethods;
     $this->lstImplements = $lstImplements;
     $rtNode = $tree->AddRoot("wxPHP");
     global $cls;
     $this->treeItems = array();
     $class_names = array();
     foreach ($cls as $k => $v) {
         $clNode = $tree->AppendItem($rtNode, $k);
         $this->treeItems[] = $clNode;
         $class_names[] = $k;
     }
     $txtAutoCompletion->AutoComplete($class_names);
     $txtAutoCompletion->Connect(wxEVT_KEY_UP, array($this, "onAutoCompleteEnter"));
     $tree->ExpandAll();
     $tree->Connect(wxEVT_COMMAND_TREE_SEL_CHANGED, array($this, "onClassSelected"));
     $this->tree = $tree;
     $this->txtAutoCompletion = $txtAutoCompletion;
     $sw->SplitVertically($leftPanel, $rightPanel);
     $sw->SetMinimumPaneSize(150);
     $this->sz->Add($sw, 1, wxEXPAND | wxALL);
     $this->SetSizer($this->sz);
     $mb = new wxMenuBar();
     $mn = new wxMenu();
     $mn->Append(-1, "&Save", "save the changes to classes.json");
     $mb->Append($mn, "&File");
     $this->SetMenuBar($mb);
     $sbar = $this->CreateStatusBar(2);
     $sbar->SetStatusText("wxPHP Class Methods Selector");
     $sbar->SetStatusText("v0.2", 1);
     $this->SetStatusWidths(2, array(250, -1));
     $this->Connect(wxEVT_COMMAND_MENU_SELECTED, array($this, "onSave"));
     $this->Connect(wxEVT_CLOSE_WINDOW, array($this, "onWindowClose"));
     $this->taskBar = new wxTaskBarIconCustom();
     $this->taskBar->SetIcon(new wxIcon("sample.xpm", wxBITMAP_TYPE_XPM), "wxPHP Classes Selector v0.2");
     $this->taskBar->Connect(wxEVT_TASKBAR_LEFT_DCLICK, array($this, "onTaskBarClick"));
 }
コード例 #3
0
ファイル: control.php プロジェクト: halfer/wxphp
 public function __construct(array $demoNames, array $helpStrings, $parent = null)
 {
     // The "dialog style" means that the window deliberately cannot be resized
     parent::__construct($parent, wxID_TOP, "Sizer controller", wxDefaultPosition, new wxSize(-1, -1), wxDEFAULT_DIALOG_STYLE);
     $this->SetPosition(new wxPoint(100, 100));
     // Create the main drop-down and help controls
     $this->choiceCtrl = new wxChoice($this, self::ID_DEMO, wxDefaultPosition, new wxSize(-1, -1), $demoNames);
     $this->helpCtrl = new wxStaticText($this, wxID_ANY, '', wxDefaultPosition, new wxSize($this->helpWidth, -1));
     $sizer = new wxBoxSizer(wxVERTICAL);
     // The menu and help controls are set to expand to the window width
     $sizer->Add($this->choiceCtrl, 0, wxALL + wxEXPAND, 8);
     $sizer->Add($this->helpCtrl, 1, wxLEFT + wxRIGHT + wxBOTTOM + wxEXPAND, 8);
     $this->initAlignControls($sizer);
     // Put these controls in a frame
     $frameSizer = $this->createFrameSizer("Borders", wxVERTICAL);
     $this->initBorderSizeControl($frameSizer);
     $this->initBorderAddControls($frameSizer);
     $this->addItemToSizer($sizer, $frameSizer);
     $this->SetSizerAndFit($sizer);
     // Save the help strings in this class too
     $this->helpStrings = $helpStrings;
     // Expand the help text to the largest size it will need to be
     $this->setHelpControlSize();
     // Here's some widget events
     $this->Connect(wxEVT_CHOICE, [$this, "controlChangeEvent"]);
     $this->Connect(wxEVT_SPINCTRL, [$this, "controlSpinEvent"]);
     $this->Connect(wxEVT_CHECKBOX, [$this, "controlCheckBoxEvent"]);
     // Fixes redraw glitches just before the loop starts
     $this->Layout();
 }
コード例 #4
0
ファイル: webview.php プロジェクト: phpsong/wxphp
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, wxEmptyString, wxDefaultPosition, new wxSize(500, 300), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $bSizer1 = new wxBoxSizer(wxVERTICAL);
     $this->m_webView = wxWebView::NewMethod($this, wxID_ANY, "http://wxphp.org/");
     $bSizer1->Add($this->m_webView, 1, wxALL | wxEXPAND, 5);
     $this->SetSizer($bSizer1);
     $this->Layout();
     $this->Centre(wxBOTH);
 }
コード例 #5
0
ファイル: choicelistbox.php プロジェクト: phpsong/wxphp
 function mainFrame()
 {
     parent::__construct(null, 10, "Checks List Box Example");
     for ($i = 0; $i <= 100; $i++) {
         $array_strings[] = $i;
     }
     $check = new wxCheckListBox($this, wxID_ANY, new wxPoint(0, 0), new wxSize(0, 0), $array_strings);
     $status_bar = $this->CreateStatusBar(1);
     $status_bar->SetMinHeight(30);
     $status_bar->SetStatusText("List generated with PHP array");
 }
コード例 #6
0
ファイル: filesystemwatcher.php プロジェクト: phpsong/wxphp
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_TOP, "File system watcher");
     // Create a text box for logging progress
     $this->createTextBox();
     // Create the folder if it does not exist
     $this->checkFolderExists();
     // Use a timer to start the file watcher after the event loop starts. This seems to be
     // necessary to avoid the fatal error "File system watcher needs an event loop".
     $this->timer = new wxTimer($this);
     $this->Connect(wxEVT_TIMER, array($this, "onTimer"));
     $this->timer->Start(100);
 }
コード例 #7
0
ファイル: thread.php プロジェクト: rapulu/wxphp
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "Simple PDF to SWF", wxDefaultPosition, new wxSize(700, 500), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $mainSizer = new wxBoxSizer(wxHORIZONTAL);
     $leftSizer = new wxBoxSizer(wxVERTICAL);
     $this->fileNavigator = new wxGenericDirCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL | wxSUNKEN_BORDER, "PDF Files (*.pdf)|*.pdf", 0);
     $this->fileNavigator->ShowHidden(false);
     $leftSizer->Add($this->fileNavigator, 1, wxALL | wxEXPAND, 5);
     $mainSizer->Add($leftSizer, 1, wxEXPAND, 5);
     $rightSizer = new wxBoxSizer(wxVERTICAL);
     $bSizer4 = new wxBoxSizer(wxHORIZONTAL);
     $this->m_lblDocumentsToConvert = new wxStaticText($this, wxID_ANY, "Documents to convert:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_lblDocumentsToConvert->Wrap(-1);
     $bSizer4->Add($this->m_lblDocumentsToConvert, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5);
     $this->m_clear = new wxButton($this, wxID_ANY, "Clear List", wxDefaultPosition, wxDefaultSize, 0);
     $bSizer4->Add($this->m_clear, 0, wxALIGN_RIGHT | wxALL, 5);
     $rightSizer->Add($bSizer4, 0, wxEXPAND, 5);
     $m_pdfListChoices = array();
     $this->m_pdfList = new wxCheckListBox($this, wxID_ANY, wxDefaultPosition, wxDefaultSize, $m_pdfListChoices, 0);
     $rightSizer->Add($this->m_pdfList, 1, wxALL | wxEXPAND, 5);
     $bSizer5 = new wxBoxSizer(wxHORIZONTAL);
     $this->m_lblOutputDir = new wxStaticText($this, wxID_ANY, "Output:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_lblOutputDir->Wrap(-1);
     $bSizer5->Add($this->m_lblOutputDir, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
     $this->m_outpurDir = new wxDirPickerCtrl($this, wxID_ANY, wxEmptyString, "Select the output directory", wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE);
     $bSizer5->Add($this->m_outpurDir, 1, wxALL | wxEXPAND, 5);
     $this->m_convert = new wxButton($this, wxID_ANY, "Convert All", wxDefaultPosition, wxDefaultSize, 0);
     $bSizer5->Add($this->m_convert, 0, wxALIGN_CENTER | wxALL, 5);
     $rightSizer->Add($bSizer5, 0, wxEXPAND, 5);
     $this->m_status = new wxGauge($this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL);
     $rightSizer->Add($this->m_status, 0, wxALL | wxEXPAND, 5);
     $mainSizer->Add($rightSizer, 1, wxEXPAND, 5);
     $this->SetSizer($mainSizer);
     $this->Layout();
     $this->Centre(wxBOTH);
     $this->converting = false;
     $this->m_timer = new wxTimer($this);
     $this->document_converter = new DocumentConverter($this);
     // Connect Events
     $this->fileNavigator->Connect(wxEVT_KEY_DOWN, array($this, "onFileNagivationKeyDown"));
     $this->fileNavigator->GetTreeCtrl()->Connect(wxEVT_LEFT_DCLICK, array($this, "onFileNavigationDClick"));
     $this->m_clear->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "onClearClick"));
     $this->m_pdfList->Connect(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, array($this, "onPdfListItemToggled"));
     $this->m_convert->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "onConvertClick"));
     $this->Connect(wxEVT_TIMER, array($this, "onTimer"));
 }
コード例 #8
0
ファイル: dragdrop.php プロジェクト: phpsong/wxphp
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "Drag and Drop Sample", wxDefaultPosition, new wxSize(500, 300), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $bSizer1 = new wxBoxSizer(wxVERTICAL);
     $bSizer4 = new wxBoxSizer(wxVERTICAL);
     $this->m_staticText1 = new wxStaticText($this, wxID_ANY, "Drop Text:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText1->Wrap(-1);
     $bSizer4->Add($this->m_staticText1, 0, wxALL, 5);
     $bSizer1->Add($bSizer4, 0, wxEXPAND, 5);
     $bSizer2 = new wxBoxSizer(wxVERTICAL);
     $this->m_textCtrl1 = new wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxTE_MULTILINE);
     $bSizer2->Add($this->m_textCtrl1, 1, wxALL | wxEXPAND, 5);
     $bSizer1->Add($bSizer2, 1, wxEXPAND, 5);
     $bSizer41 = new wxBoxSizer(wxVERTICAL);
     $this->m_staticText11 = new wxStaticText($this, wxID_ANY, "Drop Files:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText11->Wrap(-1);
     $bSizer41->Add($this->m_staticText11, 0, wxALL, 5);
     $bSizer1->Add($bSizer41, 0, wxEXPAND, 5);
     $bSizer21 = new wxBoxSizer(wxVERTICAL);
     $this->m_textCtrl11 = new wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxTE_MULTILINE | wxTE_READONLY);
     $bSizer21->Add($this->m_textCtrl11, 1, wxALL | wxEXPAND, 5);
     $bSizer1->Add($bSizer21, 1, wxEXPAND, 5);
     $this->SetSizer($bSizer1);
     $this->Layout();
     $this->m_menubar1 = new wxMenuBar(0);
     $this->m_menu1 = new wxMenu();
     $this->m_menuItem1 = new wxMenuItem($this->m_menu1, wxID_ANY, "&Quit", wxEmptyString, wxITEM_NORMAL);
     $this->m_menu1->Append($this->m_menuItem1);
     $this->m_menubar1->Append($this->m_menu1, "&File");
     $this->SetMenuBar($this->m_menubar1);
     $this->Centre(wxBOTH);
     // Drag stuff
     $dt2 = new TextDropTarget($this->m_textCtrl1);
     $this->m_textCtrl1->SetDropTarget($dt2);
     $dt3 = new FileDropTarget($this->m_textCtrl11);
     $this->m_textCtrl11->SetDropTarget($dt3);
     // Connect Events
     $this->Connect($this->m_menuItem1->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "CloseWindow"));
 }
コード例 #9
0
ファイル: grid.php プロジェクト: phpsong/wxphp
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, wxEmptyString, wxDefaultPosition, new wxSize(500, 300), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $bSizer1 = new wxBoxSizer(wxVERTICAL);
     $this->m_grid1 = new wxGrid($this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
     # Grid
     $this->m_grid1->CreateGrid(5, 5);
     $this->m_grid1->EnableEditing(true);
     $this->m_grid1->EnableGridLines(true);
     $this->m_grid1->EnableDragGridSize(false);
     $this->m_grid1->SetMargins(0, 0);
     # Columns
     $this->m_grid1->EnableDragColMove(false);
     $this->m_grid1->EnableDragColSize(true);
     $this->m_grid1->SetColLabelSize(30);
     $this->m_grid1->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
     # Rows
     $this->m_grid1->EnableDragRowSize(true);
     $this->m_grid1->SetRowLabelSize(80);
     $this->m_grid1->SetRowLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
     # Label Appearance
     # Cell Defaults
     $this->m_grid1->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_TOP);
     $bSizer1->Add($this->m_grid1, 1, wxALL | wxEXPAND, 5);
     # Set renderer for last column
     $this->attr = new wxGridCellAttr();
     $this->attr->SetReadOnly(true);
     $this->attr->SetRenderer(new wxGridButtonRenderer("..."));
     $this->m_grid1->SetColAttr(4, $this->attr);
     # Add grid left click event
     $this->m_grid1->Connect(wxEVT_GRID_CELL_LEFT_CLICK, array($this, "OnGridCellLeftClick"));
     $this->SetSizer($bSizer1);
     $this->Layout();
     $this->Centre(wxBOTH);
     $font = $this->GetFont();
     var_dump($font->GetFaceName());
 }
コード例 #10
0
ファイル: styledtextctrl.php プロジェクト: phpsong/wxphp
 function mainFrame()
 {
     parent::__construct(null, null, "Minimal wxPHP App", wxDefaultPosition, wxDefaultSize);
     $mb = new wxMenuBar();
     $mn = new wxMenu();
     $mn->Append(2, "E&xit", "Quit this program");
     $mb->Append($mn, "&File");
     $mn = new wxMenu();
     $mn->AppendCheckItem(4, "&About...", "Show about dialog");
     $mb->Append($mn, "&Help");
     $this->SetMenuBar($mb);
     $this->scite = new wxStyledTextCtrl($this);
     $this->scite->StyleClearAll();
     $this->scite->SetMarginWidth(0, 50);
     $this->scite->StyleSetForeground(wxSTC_STYLE_LINENUMBER, new wxColour(75, 75, 75));
     $this->scite->StyleSetBackground(wxSTC_STYLE_LINENUMBER, new wxColour(220, 220, 220));
     $this->scite->SetMarginType(0, wxSTC_MARGIN_NUMBER);
     $this->scite->SetWrapMode(wxSTC_WRAP_WORD);
     $this->scite->SetText("<?php\n\n\$myvar = 1 + 2;\n\nprint 'Hello World';\n\n?>\n");
     $this->scite->SetStyleBits(7);
     $this->scite->SetLexer(wxSTC_LEX_PHPSCRIPT);
     $this->scite->StyleSetForeground(wxSTC_HPHP_DEFAULT, new wxColour(0, 0, 0));
     $this->scite->StyleSetForeground(wxSTC_HPHP_HSTRING, new wxColour(255, 0, 0));
     $this->scite->StyleSetForeground(wxSTC_HPHP_SIMPLESTRING, new wxColour(255, 0, 0));
     $this->scite->StyleSetForeground(wxSTC_HPHP_WORD, new wxColour(0, 0, 155));
     $this->scite->StyleSetForeground(wxSTC_HPHP_NUMBER, new wxColour(0, 150, 0));
     $this->scite->StyleSetForeground(wxSTC_HPHP_VARIABLE, new wxColour(0, 0, 150));
     $this->scite->StyleSetForeground(wxSTC_HPHP_COMMENT, new wxColour(150, 150, 150));
     $this->scite->StyleSetForeground(wxSTC_HPHP_COMMENTLINE, new wxColour(150, 150, 150));
     $this->scite->StyleSetForeground(wxSTC_HPHP_HSTRING_VARIABLE, new wxColour(0, 0, 150));
     $this->scite->StyleSetForeground(wxSTC_HPHP_OPERATOR, new wxColour(0, 150, 0));
     $sbar = $this->CreateStatusBar(2);
     $sbar->SetStatusText("Welcome to wxPHP...");
     $this->Connect(2, wxEVT_COMMAND_MENU_SELECTED, array($this, "onQuit"));
     $this->Connect(4, wxEVT_COMMAND_MENU_SELECTED, array($this, "onAbout"));
 }
コード例 #11
0
ファイル: sample.php プロジェクト: nwsw/wxphp
 function mainFrame()
 {
     parent::__construct(null, null, "Minimal wxPHP App", wxDefaultPosition, new wxSize(350, 260));
     /*$ico = new wxIcon();
     		$ico->CopyFromBitmap(new wxBitmap("sample.xpm",wxBITMAP_TYPE_XPM));
     		$this->SetIcon($ico);*/
     $mb = new wxMenuBar();
     $mn = new wxMenu();
     $mn->Append(2, "E&xit", "Quit this program");
     $mb->Append($mn, "&File");
     $mn = new wxMenu();
     $mn->AppendCheckItem(4, "&About...", "Show about dialog");
     $mb->Append($mn, "&Help");
     $this->SetMenuBar($mb);
     //$dummy = new wxPanel($this);
     //$sz = new wxBoxSizer(wxVERTICAL);
     $scite = new wxStyledTextCtrl($this);
     //$sz->Add($scite);
     //$dummy->SetSizer($sz);
     $sbar = $this->CreateStatusBar(2);
     $sbar->SetStatusText("Welcome to wxPHP...");
     $this->Connect(2, wxEVT_COMMAND_MENU_SELECTED, array($this, "onQuit"));
     $this->Connect(4, wxEVT_COMMAND_MENU_SELECTED, array($this, "onAbout"));
 }
コード例 #12
0
 /**
  * Initializes a new instance of the MyFrame4 class.
  * @param type $parent
  */
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "Relations", wxDefaultPosition, new wxSize(715, 610), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_SCROLLBAR));
     $gSizer1 = new wxGridSizer(1, 2, 0, 170);
     $this->m_grid1 = new wxGrid($this, wxID_ANY, wxDefaultPosition, new wxSize(430, 570), wxHSCROLL | wxWANTS_CHARS);
     # Grid
     $this->m_grid1->CreateGrid(0, 4);
     $this->m_grid1->EnableEditing(false);
     $this->m_grid1->EnableGridLines(true);
     $this->m_grid1->EnableDragGridSize(false);
     $this->m_grid1->SetMargins(0, 0);
     # Columns
     $this->m_grid1->EnableDragColMove(false);
     $this->m_grid1->EnableDragColSize(true);
     $this->m_grid1->SetColLabelSize(30);
     $this->m_grid1->SetColLabelValue(0, "Id");
     $this->m_grid1->SetColLabelValue(1, "Person1");
     $this->m_grid1->SetColLabelValue(2, "Relationship");
     $this->m_grid1->SetColLabelValue(3, "Person2");
     $this->m_grid1->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
     # Rows
     $this->m_grid1->EnableDragRowSize(true);
     $this->m_grid1->SetRowLabelSize(0);
     $this->m_grid1->SetRowLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
     # Label Appearance
     # Cell Defaults
     $this->m_grid1->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_TOP);
     $gSizer1->Add($this->m_grid1, 0, wxALL, 5);
     $gSizer2 = new wxGridSizer(2, 1, 0, 0);
     $sbSizer1 = new wxStaticBoxSizer(new wxStaticBox($this, wxID_ANY, "Modify:"), wxVERTICAL);
     $gSizer3 = new wxGridSizer(2, 1, 0, 0);
     $gSizer7 = new wxGridSizer(1, 2, 0, 0);
     $gSizer9 = new wxGridSizer(4, 1, 0, 0);
     $this->m_staticText1 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Person1:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText1->Wrap(-1);
     $gSizer9->Add($this->m_staticText1, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText2 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Relationship:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText2->Wrap(-1);
     $gSizer9->Add($this->m_staticText2, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText3 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Person2:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText3->Wrap(-1);
     $gSizer9->Add($this->m_staticText3, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer7->Add($gSizer9, 1, wxEXPAND, 5);
     $gSizer10 = new wxGridSizer(4, 1, 0, 0);
     $m_comboBox1Choices = array();
     $this->m_comboBox1 = new wxComboBox($sbSizer1->GetStaticBox(), wxID_ANY, "Combo!", wxDefaultPosition, wxDefaultSize, $m_comboBox1Choices, 0);
     $gSizer10->Add($this->m_comboBox1, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5);
     $m_comboBox2Choices = array();
     $this->m_comboBox2 = new wxComboBox($sbSizer1->GetStaticBox(), wxID_ANY, "Combo!", wxDefaultPosition, wxDefaultSize, $m_comboBox2Choices, 0);
     $gSizer10->Add($this->m_comboBox2, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5);
     $m_comboBox3Choices = array();
     $this->m_comboBox3 = new wxComboBox($sbSizer1->GetStaticBox(), wxID_ANY, "Combo!", wxDefaultPosition, wxDefaultSize, $m_comboBox3Choices, 0);
     $gSizer10->Add($this->m_comboBox3, 1, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL, 5);
     $gSizer7->Add($gSizer10, 1, wxEXPAND, 5);
     $gSizer3->Add($gSizer7, 1, wxEXPAND, 5);
     $gSizer8 = new wxGridSizer(1, 3, 0, 0);
     $this->m_button2 = new wxButton($sbSizer1->GetStaticBox(), wxID_ANY, "Add", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_button2, 1, wxALL | wxALIGN_BOTTOM | wxALIGN_CENTER_HORIZONTAL, 5);
     $this->m_button3 = new wxButton($sbSizer1->GetStaticBox(), wxID_ANY, "Edit", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_button3, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM, 5);
     $this->m_button4 = new wxButton($sbSizer1->GetStaticBox(), wxID_ANY, "Delete", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_button4, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM, 5);
     $gSizer3->Add($gSizer8, 1, wxEXPAND, 5);
     $sbSizer1->Add($gSizer3, 1, wxEXPAND, 5);
     $gSizer2->Add($sbSizer1, 1, wxEXPAND, 5);
     $gSizer4 = new wxGridSizer(2, 1, 0, 0);
     $sbSizer2 = new wxStaticBoxSizer(new wxStaticBox($this, wxID_ANY, "Helper:"), wxVERTICAL);
     $gSizer6 = new wxGridSizer(1, 2, 0, 0);
     $gSizer11 = new wxGridSizer(4, 1, 0, 0);
     $this->m_staticText4 = new wxStaticText($sbSizer2->GetStaticBox(), wxID_ANY, "Person1:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText4->Wrap(-1);
     $gSizer11->Add($this->m_staticText4, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText5 = new wxStaticText($sbSizer2->GetStaticBox(), wxID_ANY, "Relationship:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText5->Wrap(-1);
     $gSizer11->Add($this->m_staticText5, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText6 = new wxStaticText($sbSizer2->GetStaticBox(), wxID_ANY, "Person2:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText6->Wrap(-1);
     $gSizer11->Add($this->m_staticText6, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer6->Add($gSizer11, 1, wxEXPAND, 5);
     $gSizer12 = new wxGridSizer(4, 1, 0, 0);
     $this->m_staticText7 = new wxStaticText($sbSizer2->GetStaticBox(), wxID_ANY, "MyLabel", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText7->Wrap(-1);
     $gSizer12->Add($this->m_staticText7, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText8 = new wxStaticText($sbSizer2->GetStaticBox(), wxID_ANY, "MyLabel", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText8->Wrap(-1);
     $gSizer12->Add($this->m_staticText8, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText9 = new wxStaticText($sbSizer2->GetStaticBox(), wxID_ANY, "MyLabel", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText9->Wrap(-1);
     $gSizer12->Add($this->m_staticText9, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer6->Add($gSizer12, 1, wxEXPAND, 5);
     $sbSizer2->Add($gSizer6, 1, wxEXPAND, 5);
     $gSizer4->Add($sbSizer2, 1, wxEXPAND, 5);
     $gSizer5 = new wxGridSizer(1, 2, 0, 0);
     $this->m_button1 = new wxButton($this, wxID_ANY, "List", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer5->Add($this->m_button1, 1, wxALL | wxALIGN_BOTTOM, 5);
     $this->m_button5 = new wxButton($this, wxID_ANY, "Close", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer5->Add($this->m_button5, 1, wxALL | wxALIGN_BOTTOM | wxALIGN_RIGHT, 5);
     $gSizer4->Add($gSizer5, 1, wxEXPAND, 5);
     $gSizer2->Add($gSizer4, 1, wxEXPAND, 5);
     $gSizer1->Add($gSizer2, 1, wxEXPAND, 5);
     $this->SetSizer($gSizer1);
     $this->Layout();
     $this->Centre(wxBOTH);
     // Connect Events
     $this->Connect(wxEVT_ACTIVATE, array($this, "MyFrame4OnActivate"));
     $this->m_grid1->Connect(wxEVT_GRID_SELECT_CELL, array($this, "m_grid1OnGridSelectCell"));
     $this->m_comboBox1->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED, array($this, "m_comboBox1OnCombobox"));
     $this->m_comboBox2->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED, array($this, "m_comboBox2OnCombobox"));
     $this->m_comboBox3->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED, array($this, "m_comboBox3OnCombobox"));
     $this->m_button2->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button2OnButtonClick"));
     $this->m_button3->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button3OnButtonClick"));
     $this->m_button4->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button4OnButtonClick"));
     $this->m_button1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button1OnButtonClick"));
     $this->m_button5->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button5OnButtonClick"));
 }
コード例 #13
0
ファイル: resources.php プロジェクト: sdgdsffdsfff/phar-gui
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "Phar GUI", wxDefaultPosition, new wxSize(640, 480), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $this->m_menubar = new wxMenuBar(0);
     $this->m_menuFile = new wxMenu();
     $this->m_menuItemNew = new wxMenuItem($this->m_menuFile, wxID_NEW, "New" . "\t" . "Ctrl-N", "Create a new phar file.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemNew);
     $this->m_menuItemOpen = new wxMenuItem($this->m_menuFile, wxID_OPEN, "Open" . "\t" . "Ctrl-O", "Open an existing phar file.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemOpen);
     $this->m_menuItemBuild = new wxMenuItem($this->m_menuFile, wxID_ANY, "Build from directory" . "\t" . "Ctrl-B", "Create a new phar file using the content of a given directory.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemBuild);
     $this->m_menuFile->AppendSeparator();
     $this->m_menuItemReload = new wxMenuItem($this->m_menuFile, wxID_REFRESH, "Reload" . "\t" . "Ctrl-R", "Reload the content of the current phar file.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemReload);
     $this->m_menuItemPreferences = new wxMenuItem($this->m_menuFile, wxID_PREFERENCES, "Preferences" . "\t" . "Ctrl-P", "Configure the current phar options.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemPreferences);
     $this->m_menuItemExtract = new wxMenuItem($this->m_menuFile, wxID_ANY, "Extract" . "\t" . "Ctrl-E", "Extract a selected file from the phar.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemExtract);
     $this->m_menuItemExtractAll = new wxMenuItem($this->m_menuFile, wxID_ANY, "Extract All" . "\t" . "Shift-Ctrl-E", "Extract all the files and directories on the phar.", wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemExtractAll);
     $this->m_menuFile->AppendSeparator();
     $this->m_menuItemQuit = new wxMenuItem($this->m_menuFile, wxID_CLOSE, "Quit" . "\t" . "Alt-F4", wxEmptyString, wxITEM_NORMAL);
     $this->m_menuFile->Append($this->m_menuItemQuit);
     $this->m_menubar->Append($this->m_menuFile, "&File");
     $this->m_menuEdit = new wxMenu();
     $this->m_menuItemAddDir = new wxMenuItem($this->m_menuEdit, wxID_ADD, "Add Directory" . "\t" . "Ctrl-D", "Add new empty directory to the phar.", wxITEM_NORMAL);
     $this->m_menuEdit->Append($this->m_menuItemAddDir);
     $this->m_menuItemAddFile = new wxMenuItem($this->m_menuEdit, wxID_FILE, "Add File" . "\t" . "Ctrl-F", "Add a new file to the phar.", wxITEM_NORMAL);
     $this->m_menuEdit->Append($this->m_menuItemAddFile);
     $this->m_menuItemDelete = new wxMenuItem($this->m_menuEdit, wxID_DELETE, "Delete" . "\t" . "Shift-Ctrl-D", "Delete a selected file from the phar.", wxITEM_NORMAL);
     $this->m_menuEdit->Append($this->m_menuItemDelete);
     $this->m_menuItemStub = new wxMenuItem($this->m_menuEdit, wxID_EXECUTE, "Stub" . "\t" . "Ctrl-T", "PHP bootstrap code that is executed when invoking the phar file.", wxITEM_NORMAL);
     $this->m_menuEdit->Append($this->m_menuItemStub);
     $this->m_menuItemAlias = new wxMenuItem($this->m_menuEdit, wxID_ANY, "Alias" . "\t" . "Ctrl-L", "Alias used internally to reference the phar file.", wxITEM_NORMAL);
     $this->m_menuEdit->Append($this->m_menuItemAlias);
     $this->m_menubar->Append($this->m_menuEdit, "&Edit");
     $this->m_menuHelp = new wxMenu();
     $this->m_menuItemAbout = new wxMenuItem($this->m_menuHelp, wxID_ABOUT, "About" . "\t" . "F1", "Information about PharGUI", wxITEM_NORMAL);
     $this->m_menuHelp->Append($this->m_menuItemAbout);
     $this->m_menubar->Append($this->m_menuHelp, "&Help");
     $this->SetMenuBar($this->m_menubar);
     $this->m_statusBar = $this->CreateStatusBar(1, wxST_SIZEGRIP, wxID_ANY);
     $mainSizer = new wxBoxSizer(wxVERTICAL);
     $this->m_treeCtrlFiles = new wxTreeCtrl($this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE);
     $mainSizer->Add($this->m_treeCtrlFiles, 1, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL, 5);
     $this->SetSizer($mainSizer);
     $this->Layout();
     $this->Centre(wxBOTH);
     // Connect Events
     $this->Connect($this->m_menuItemNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuNew"));
     $this->Connect($this->m_menuItemOpen->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuOpen"));
     $this->Connect($this->m_menuItemBuild->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuBuild"));
     $this->Connect($this->m_menuItemReload->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuReload"));
     $this->Connect($this->m_menuItemPreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuPreferences"));
     $this->Connect($this->m_menuItemExtract->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuExtract"));
     $this->Connect($this->m_menuItemExtractAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuExtractAll"));
     $this->Connect($this->m_menuItemQuit->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuQuit"));
     $this->Connect($this->m_menuItemAddDir->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuAddDir"));
     $this->Connect($this->m_menuItemAddFile->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuAddFile"));
     $this->Connect($this->m_menuItemDelete->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuDelete"));
     $this->Connect($this->m_menuItemStub->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuStub"));
     $this->Connect($this->m_menuItemAlias->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuAlias"));
     $this->Connect($this->m_menuItemAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "OnMenuAbout"));
     $this->m_treeCtrlFiles->Connect(wxEVT_LEFT_DCLICK, array($this, "OnTreeLeftClick"));
     $this->m_treeCtrlFiles->Connect(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, array($this, "OnTreeRightClick"));
     $this->m_treeCtrlFiles->Connect(wxEVT_COMMAND_TREE_SEL_CHANGED, array($this, "OnTreeSelChanged"));
 }
コード例 #14
0
 /**
  * Initializes a new instance of the MyFrame2 class.
  * @param type $parent
  */
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "People", wxDefaultPosition, new wxSize(715, 610), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_SCROLLBAR));
     $gSizer1 = new wxGridSizer(1, 2, 0, 170);
     $this->m_grid1 = new wxGrid($this, wxID_ANY, wxDefaultPosition, new wxSize(430, 570), wxHSCROLL | wxVSCROLL);
     # Grid
     $this->m_grid1->CreateGrid(0, 5);
     $this->m_grid1->EnableEditing(false);
     $this->m_grid1->EnableGridLines(true);
     $this->m_grid1->EnableDragGridSize(false);
     $this->m_grid1->SetMargins(0, 0);
     # Columns
     $this->m_grid1->EnableDragColMove(false);
     $this->m_grid1->EnableDragColSize(true);
     $this->m_grid1->SetColLabelSize(30);
     $this->m_grid1->SetColLabelValue(0, "Id");
     $this->m_grid1->SetColLabelValue(1, "Name");
     $this->m_grid1->SetColLabelValue(2, "Mothername");
     $this->m_grid1->SetColLabelValue(3, "Location");
     $this->m_grid1->SetColLabelValue(4, "Birthdate");
     $this->m_grid1->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
     # Rows
     $this->m_grid1->EnableDragRowSize(true);
     $this->m_grid1->SetRowLabelSize(0);
     $this->m_grid1->SetRowLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
     # Label Appearance
     # Cell Defaults
     $this->m_grid1->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_TOP);
     $gSizer1->Add($this->m_grid1, 0, wxALL, 5);
     $gSizer2 = new wxGridSizer(2, 1, 0, 0);
     $sbSizer1 = new wxStaticBoxSizer(new wxStaticBox($this, wxID_ANY, "Modify:"), wxVERTICAL);
     $gSizer3 = new wxGridSizer(2, 1, 0, 0);
     $gSizer5 = new wxGridSizer(1, 2, 0, 0);
     $gSizer7 = new wxGridSizer(4, 1, 0, 0);
     $this->m_staticText1 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Name:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText1->Wrap(-1);
     $gSizer7->Add($this->m_staticText1, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText2 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Mothername:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText2->Wrap(-1);
     $gSizer7->Add($this->m_staticText2, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText3 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Location:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText3->Wrap(-1);
     $gSizer7->Add($this->m_staticText3, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_staticText4 = new wxStaticText($sbSizer1->GetStaticBox(), wxID_ANY, "Birthdate:", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText4->Wrap(-1);
     $gSizer7->Add($this->m_staticText4, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer5->Add($gSizer7, 1, wxEXPAND, 5);
     $gSizer8 = new wxGridSizer(4, 1, 0, 0);
     $this->m_textCtrl1 = new wxTextCtrl($sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_textCtrl1, 1, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_textCtrl2 = new wxTextCtrl($sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_textCtrl2, 1, wxALL | wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
     $this->m_textCtrl3 = new wxTextCtrl($sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_textCtrl3, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5);
     $this->m_textCtrl4 = new wxTextCtrl($sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $gSizer8->Add($this->m_textCtrl4, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5);
     $gSizer5->Add($gSizer8, 1, wxEXPAND, 5);
     $gSizer3->Add($gSizer5, 1, wxEXPAND, 5);
     $gSizer6 = new wxGridSizer(1, 3, 0, 0);
     $this->m_button2 = new wxButton($sbSizer1->GetStaticBox(), wxID_ANY, "Add", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer6->Add($this->m_button2, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM, 5);
     $this->m_button3 = new wxButton($sbSizer1->GetStaticBox(), wxID_ANY, "Edit", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer6->Add($this->m_button3, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM, 5);
     $this->m_button4 = new wxButton($sbSizer1->GetStaticBox(), wxID_ANY, "Delete", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer6->Add($this->m_button4, 1, wxALL | wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM, 5);
     $gSizer3->Add($gSizer6, 1, wxEXPAND, 5);
     $sbSizer1->Add($gSizer3, 1, wxEXPAND, 5);
     $gSizer2->Add($sbSizer1, 1, wxEXPAND | wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL, 5);
     $gSizer4 = new wxGridSizer(1, 2, 0, 0);
     $this->m_button1 = new wxButton($this, wxID_ANY, "List", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer4->Add($this->m_button1, 1, wxALL | wxALIGN_BOTTOM, 5);
     $this->m_button5 = new wxButton($this, wxID_ANY, "Close", wxDefaultPosition, wxDefaultSize, 0);
     $gSizer4->Add($this->m_button5, 1, wxALL | wxALIGN_BOTTOM | wxALIGN_RIGHT, 5);
     $gSizer2->Add($gSizer4, 1, wxEXPAND, 5);
     $gSizer1->Add($gSizer2, 1, wxEXPAND, 5);
     $this->SetSizer($gSizer1);
     $this->Layout();
     $this->Centre(wxBOTH);
     // Connect Events
     $this->Connect(wxEVT_ACTIVATE, array($this, "MyFrame2OnActivate"));
     $this->m_grid1->Connect(wxEVT_GRID_SELECT_CELL, array($this, "m_grid1OnGridSelectCell"));
     $this->m_textCtrl1->Connect(wxEVT_COMMAND_TEXT_UPDATED, array($this, "m_textCtrl1OnText"));
     $this->m_textCtrl2->Connect(wxEVT_COMMAND_TEXT_UPDATED, array($this, "m_textCtrl2OnText"));
     $this->m_textCtrl3->Connect(wxEVT_COMMAND_TEXT_UPDATED, array($this, "m_textCtrl3OnText"));
     $this->m_textCtrl4->Connect(wxEVT_COMMAND_TEXT_UPDATED, array($this, "m_textCtrl4OnText"));
     $this->m_button2->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button2OnButtonClick"));
     $this->m_button3->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button3OnButtonClick"));
     $this->m_button4->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button4OnButtonClick"));
     $this->m_button1->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button1OnButtonClick"));
     $this->m_button5->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "m_button5OnButtonClick"));
 }
コード例 #15
0
ファイル: gui.php プロジェクト: NewDelion/PocketMine-0.13.x
 function __construct($parent = Null)
 {
     parent::__construct($parent, wxID_ANY, "PocketMine-MP {VERSION} server", wxDefaultPosition, new \wxSize(800, 480), wxCAPTION | wxCLOSE_BOX | wxMINIMIZE_BOX | wxSYSTEM_MENU | wxTAB_TRAVERSAL);
     $this->SetIcon(new \wxIcon("./images/app.png", wxBITMAP_TYPE_PNG));
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $this->SetBackgroundColour(new \wxColour(240, 240, 240));
     $this->menuBar = new \wxMenuBar();
     $this->menuServer = new \wxMenu();
     $this->menuBar->Append($this->menuServer, "&Server");
     $this->menuServerStart = new \wxMenuItem($this->menuServer, wxID_ANY, "S&tart", "Start server ...", wxITEM_NORMAL);
     //$this->menuServerStart->SetBitmap(new \wxBitmap("./images/start.png", wxBITMAP_TYPE_PNG));
     $this->menuServer->Append($this->menuServerStart);
     $this->menuServer->AppendSeparator();
     $this->menuServerExit = new \wxMenuItem($this->menuServer, wxID_ANY, "&Exit", "Exit server ...", wxITEM_NORMAL);
     $this->menuServerExit->SetBitmap(new \wxBitmap("./images/exit.png", wxBITMAP_TYPE_PNG));
     $this->menuServer->Append($this->menuServerExit);
     $this->menuOptions = new \wxMenu();
     $this->menuBar->Append($this->menuOptions, "&Options");
     $this->menuOptionsProp = new \wxMenuItem($this->menuOptions, wxID_ANY, "&Properties", "Edit server.properties file ...", wxITEM_NORMAL);
     $this->menuOptionsProp->SetBitmap(new \wxBitmap("./images/prop.png", wxBITMAP_TYPE_PNG));
     $this->menuOptions->Append($this->menuOptionsProp);
     $this->menuOptions->AppendSeparator();
     $this->menuOptionsPlug = new \wxMenuItem($this->menuOptions, wxID_ANY, "P&lugins", "Open plugins manager ...", wxITEM_NORMAL);
     $this->menuOptionsPlug->SetBitmap(new \wxBitmap("./images/plug.png", wxBITMAP_TYPE_PNG));
     $this->menuOptions->Append($this->menuOptionsPlug);
     $this->menuHelp = new \wxMenu();
     $this->menuBar->Append($this->menuHelp, "&Help");
     $this->menuHelpForums = new \wxMenuItem($this->menuHelp, wxID_ANY, "&Forums", "Open http://forums.pocketmine.net ...", wxITEM_NORMAL);
     $this->menuHelpForums->SetBitmap(new \wxBitmap("./images/link.png", wxBITMAP_TYPE_PNG));
     $this->menuHelp->Append($this->menuHelpForums);
     $this->menuHelp->AppendSeparator();
     $this->menuHelpAbout = new \wxMenuItem($this->menuHelp, wxID_ANY, "&About...", "About PocketMine-MP ...", wxITEM_NORMAL);
     $this->menuHelpAbout->SetBitmap(new \wxBitmap("./images/about.png", wxBITMAP_TYPE_PNG));
     $this->menuHelp->Append($this->menuHelpAbout);
     $this->SetMenuBar($this->menuBar);
     $bSizerMain = new \wxBoxSizer(wxHORIZONTAL);
     $bSizerLeft = new \wxBoxSizer(wxVERTICAL);
     $bSizerLeft->SetMinSize(new \wxSize(330, -1));
     $sbSizerStats = new \wxStaticBoxSizer(new \wxStaticBox($this, wxID_ANY, "Stats"), wxVERTICAL);
     $this->sTextRAM = new \wxStaticText($this, wxID_ANY, "Memory use : {MEMORY}", wxDefaultPosition, wxDefaultSize, 0);
     $this->sTextRAM->Wrap(-1);
     $sbSizerStats->Add($this->sTextRAM, 0, wxALL, 5);
     $bSizerTPS = new \wxBoxSizer(wxHORIZONTAL);
     $this->sTextTPS = new \wxStaticText($this, wxID_ANY, "TPS : ", wxDefaultPosition, wxDefaultSize, 0);
     $this->sTextTPS->Wrap(-1);
     $bSizerTPS->Add($this->sTextTPS, 0, wxALL, 5);
     $this->gaugeTPS = new \wxGauge($this, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL);
     $this->gaugeTPS->SetValue(75);
     $bSizerTPS->Add($this->gaugeTPS, 0, wxALL, 5);
     $sbSizerStats->Add($bSizerTPS, 0, wxEXPAND, 5);
     $this->sTextUP = new \wxStaticText($this, wxID_ANY, "Upload : {UP} kB/s", wxDefaultPosition, wxDefaultSize, 0);
     $this->sTextUP->Wrap(-1);
     $sbSizerStats->Add($this->sTextUP, 0, wxALL, 5);
     $this->sTextDOWN = new \wxStaticText($this, wxID_ANY, "Download : {DOWN} kB/s", wxDefaultPosition, wxDefaultSize, 0);
     $this->sTextDOWN->Wrap(-1);
     $sbSizerStats->Add($this->sTextDOWN, 0, wxALL, 5);
     $bSizerLeft->Add($sbSizerStats, 1, wxEXPAND, 5);
     $sbSizerPlayers = new \wxStaticBoxSizer(new \wxStaticBox($this, wxID_ANY, "Players"), wxVERTICAL);
     $aplayers = array("sekjun9878", "@Intyre", "Brandon15811", "@shogchips", "BlinkSun");
     $this->lbPlayers = new \wxListBox($this, wxID_ANY, wxDefaultPosition, wxDefaultSize, $aplayers, wxLB_ALWAYS_SB | wxLB_SINGLE | wxLB_SORT | wxSTATIC_BORDER);
     $this->menulbPlayers = new \wxMenu();
     $this->menulbPlayersOp = new \wxMenuItem($this->menulbPlayers, wxID_ANY, "Op", wxEmptyString, wxITEM_NORMAL);
     $this->menulbPlayers->Append($this->menulbPlayersOp);
     $this->menulbPlayers->AppendSeparator();
     $this->menulbPlayersKick = new \wxMenuItem($this->menulbPlayers, wxID_ANY, "Kick", wxEmptyString, wxITEM_NORMAL);
     $this->menulbPlayers->Append($this->menulbPlayersKick);
     $this->menulbPlayersBan = new \wxMenuItem($this->menulbPlayers, wxID_ANY, "Ban", wxEmptyString, wxITEM_NORMAL);
     $this->menulbPlayers->Append($this->menulbPlayersBan);
     $this->menulbPlayersBanIp = new \wxMenuItem($this->menulbPlayers, wxID_ANY, "BanIp", wxEmptyString, wxITEM_NORMAL);
     $this->menulbPlayers->Append($this->menulbPlayersBanIp);
     $sbSizerPlayers->Add($this->lbPlayers, 1, wxALL | wxEXPAND, 5);
     $bSizerLeft->Add($sbSizerPlayers, 1, wxEXPAND, 5);
     $bSizerInfo = new \wxBoxSizer(wxHORIZONTAL);
     $this->hlinkPM = new \wxHyperlinkCtrl($this, wxID_ANY, "PocketMine-MP {VERSION}", "http://www.pocketmine.net", wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
     $bSizerInfo->Add($this->hlinkPM, 0, wxALL, 5);
     $this->sTextLicense = new \wxStaticText($this, wxID_ANY, "Distributed under the LGPL License", wxDefaultPosition, wxDefaultSize, 0);
     $this->sTextLicense->Wrap(-1);
     $bSizerInfo->Add($this->sTextLicense, 0, wxALL, 5);
     $bSizerLeft->Add($bSizerInfo, 0, 0, 5);
     $bSizerMain->Add($bSizerLeft, 0, wxALL | wxEXPAND, 5);
     $bSizerRight = new \wxBoxSizer(wxVERTICAL);
     $bSizerRight->SetMinSize(new \wxSize(-1, -1));
     $sbSizerConsole = new \wxStaticBoxSizer(new \wxStaticBox($this, wxID_ANY, "Log and chat"), wxVERTICAL);
     $this->bTextConsole = new \wxTextCtrl($this, wxID_ANY, "[TEST] test line", wxDefaultPosition, wxDefaultSize, wxVSCROLL | wxHSCROLL | wxALWAYS_SHOW_SB | wxSTATIC_BORDER | wxTE_READONLY | wxTE_MULTILINE);
     $sbSizerConsole->Add($this->bTextConsole, 1, wxEXPAND, 5);
     $this->bTextSend = new \wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_NO_VSCROLL);
     $sbSizerConsole->Add($this->bTextSend, 0, wxEXPAND, 5);
     $bSizerRight->Add($sbSizerConsole, 1, wxEXPAND, 5);
     $bSizerMain->Add($bSizerRight, 1, wxALL | wxEXPAND, 5);
     $this->SetSizer($bSizerMain);
     $this->Layout();
     $sbar = $this->CreateStatusBar(2);
     $sbar->SetStatusText("Welcome to PocketMine-MP.");
     $this->Connect($this->menuServerStart->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "onMenuServerStart"));
     $this->Connect($this->menuServerExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "onMenuServerExit"));
     $this->Connect($this->menuHelpForums->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "onMenuHelpForums"));
     $this->Connect($this->menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "onMenuHelpAbout"));
     $this->Connect($this->menuOptionsProp->GetId(), wxEVT_COMMAND_MENU_SELECTED, array($this, "onMenuOptionsProp"));
     $this->lbPlayers->Connect(wxEVT_RIGHT_DOWN, array($this, "onMenulbPlayers"));
     $this->Centre(wxBOTH);
     $this->ServerProperties = new frmProperties($this);
 }
コード例 #16
0
ファイル: srcMaker.gui.php プロジェクト: nwsw/wxphp
 function myFrame()
 {
     parent::__construct(null, null, "wxPhp Source Maker GUI, v0.1", wxDefaultPosition, new wxSize(600, 400));
     $this->SetIcon(new wxIcon("sample.xpm", wxBITMAP_TYPE_XPM));
     $sz = new wxBoxSizer(wxHORIZONTAL);
     $sw = new wxSplitterWindow($this, -1, wxDefaultPosition, wxDefaultSize, wxSP_NO_XP_THEME);
     $tree = new wxTreeCtrl($sw, -1);
     $dummy = new wxPanel($sw);
     $sz2 = new wxBoxSizer(wxVERTICAL);
     $lst = new wxCheckListBox($dummy, -1);
     $lst2 = new wxCheckListBox($dummy, -1);
     $lst->Connect(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, array($this, "checkLst"));
     $lst2->Connect(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, array($this, "saveImplements"));
     $sz2->Add($lst2, 1, wxEXPAND | wxALL);
     $sz2->Add($lst, 1, wxEXPAND | wxALL);
     $dummy->SetSizer($sz2);
     $this->lst = $lst;
     $this->lst2 = $lst2;
     //var_dump($dummy->AppendTextColumn("Nome",0));
     //$dummy 	= new wxListCtrl($sw,-1,wxDefaultPosition,wxDefaultSize,wxLC_REPORT);
     //$dummy->InsertColumn(0,"Nome");
     //var_dump(wxLC_ICON);
     //$dummy 	= new wxTextCtrl($sw,-1,"");
     //$dummy->Connect(wxEVT_COMMAND_TEXT_UPDATED,array($this,'simpleCB'));
     $rtNode = $tree->AddRoot("wxPHP");
     global $cls;
     foreach ($cls as $k => $v) {
         $clNode = $tree->AppendItem($rtNode, $k);
         /*foreach($v as $k1=>$v1)
         		{
         			if($k1[0]=="_")
         				continue;
         			$tree->AppendItem($clNode,$k1);
         		}*/
     }
     $tree->Connect(wxEVT_COMMAND_TREE_SEL_CHANGED, array($this, "treeSelection"));
     //$tree->ExpandAll();
     $this->tree = $tree;
     $sw->SplitVertically($tree, $dummy);
     $sw->SetMinimumPaneSize(150);
     $sz->Add($sw, 1, wxEXPAND | wxALL);
     $this->SetSizer($sz);
     $tb = $this->CreateToolBar();
     $tb->AddTool(-1, "Abrir", new wxBitmap("sample.xpm", wxBITMAP_TYPE_XPM), "Abrir documentos");
     $tb->AddSeparator();
     $tb->Realize();
     $mb = new wxMenuBar();
     $mn = new wxMenu();
     $mn->AppendCheckItem(-1, "&Salvar");
     //$mn->Append(15,"abrir","serve para abrir");
     $mb->Append($mn, "&File");
     $this->SetMenuBar($mb);
     $this->Connect(wxEVT_COMMAND_MENU_SELECTED, array($this, "simpleCB"));
 }
コード例 #17
0
ファイル: sizers.php プロジェクト: phpsong/wxphp
 public function __construct($parent = null)
 {
     parent::__construct($parent, wxID_TOP, "Sizer demo", wxDefaultPosition, new wxSize(400, 300));
     $this->SetPosition(new wxPoint(450, 100));
 }
コード例 #18
0
ファイル: statbar.php プロジェクト: phpsong/wxphp
 public function __construct($title, $pos, $size)
 {
     parent::__construct(null, wxID_ANY, $title, $pos, $size);
     $this->SetIcon(new wxIcon(__DIR__ . '/sample.xpm', wxBITMAP_TYPE_XPM));
     $this->statbarPaneStyle = wxSB_NORMAL;
     $this->field = 1;
     // create a menu bar
     $menuFile = new wxMenu();
     $menuFile->Append(StatusBar_Quit, "E&xit\tAlt-X", "Quit this program");
     $statbarMenu = new wxMenu();
     $statbarStyleMenu = new wxMenu();
     $statbarStyleMenu->Append(StatusBar_SetStyleSizeGrip, "wxSTB_SIZE_GRIP", "Toggles the wxSTB_SIZE_GRIP style", true);
     $statbarStyleMenu->Append(StatusBar_SetStyleShowTips, "wxSTB_SHOW_TIPS", "Toggles the wxSTB_SHOW_TIPS style", true);
     $statbarStyleMenu->AppendSeparator();
     $statbarStyleMenu->AppendCheckItem(StatusBar_SetStyleEllipsizeStart, "wxSTB_ELLIPSIZE_START", "Toggle wxSTB_ELLIPSIZE_START style");
     $statbarStyleMenu->AppendCheckItem(StatusBar_SetStyleEllipsizeMiddle, "wxSTB_ELLIPSIZE_MIDDLE", "Toggle wxSTB_ELLIPSIZE_MIDDLE style");
     $statbarStyleMenu->AppendCheckItem(StatusBar_SetStyleEllipsizeEnd, "wxSTB_ELLIPSIZE_END", "Toggle wxSTB_ELLIPSIZE_END style");
     $statbarMenu->Append(StatusBar_SetPaneStyle, "Status bar style", $statbarStyleMenu);
     $statbarMenu->AppendSeparator();
     $statbarMenu->Append(StatusBar_SetField, "Set active field &number\tCtrl-N", "Set the number of field used by the next commands.");
     $statbarMenu->Append(StatusBar_SetText, "Set field &text\tCtrl-T", "Set the text of the selected field.");
     $statbarMenu->Append(StatusBar_PushText, "P&ush field text\tCtrl-P", "Push a message on top the selected field.");
     $statbarMenu->Append(StatusBar_PopText, "&Pop field text\tShift-Ctrl-P", "Restore the previous contents of the selected field.");
     $statbarMenu->AppendSeparator();
     $statbarMenu->Append(StatusBar_SetFields, "&Set field count\tCtrl-C", "Set the number of status bar fields");
     $statbarMenu->Append(StatusBar_SetFont, "&Set field font\tCtrl-F", "Set the font to use for status bar fields");
     $statbarPaneStyleMenu = new wxMenu();
     $statbarPaneStyleMenu->AppendCheckItem(StatusBar_SetPaneStyleNormal, "&Normal", "Sets the style of the first field to normal (sunken) look");
     $statbarPaneStyleMenu->AppendCheckItem(StatusBar_SetPaneStyleFlat, "&Flat", "Sets the style of the first field to flat look");
     $statbarPaneStyleMenu->AppendCheckItem(StatusBar_SetPaneStyleRaised, "&Raised", "Sets the style of the first field to raised look");
     $statbarMenu->Append(StatusBar_SetPaneStyle, "Field style", $statbarPaneStyleMenu);
     $statbarMenu->Append(StatusBar_ResetFieldsWidth, "Reset field widths", "Sets all fields to the same width");
     $statbarMenu->Append(StatusBar_ShowFieldsRect, "Sho&w field rectangles\tCtrl-W", "Visually show field rectangles");
     $statbarMenu->AppendSeparator();
     $statbarMenu->AppendCheckItem(StatusBar_Toggle, "&Toggle Status Bar", "Toggle the status bar display");
     $statbarMenu->Append(StatusBar_Recreate, "&Recreate\tCtrl-R", "Toggle status bar format");
     $helpMenu = new wxMenu();
     $helpMenu->Append(StatusBar_About, "&About\tCtrl-A", "Show about dialog");
     // now append the freshly created menu to the menu bar...
     $menuBar = new wxMenuBar();
     $menuBar->Append($menuFile, "&File");
     $menuBar->Append($statbarMenu, "&Status bar");
     $menuBar->Append($helpMenu, "&Help");
     // ... and attach this menu bar to the frame
     $this->SetMenuBar($menuBar);
     // create default status bar to start with
     $this->DoCreateStatusBar(self::StatBar_Default, wxSTB_DEFAULT_STYLE);
     $this->SetStatusText("Welcome to wxWidgets!");
     $this->Connect(StatusBar_Quit, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnQuit'));
     $this->Connect(StatusBar_SetFields, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStatusFields'));
     $this->Connect(StatusBar_SetField, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStatusField'));
     $this->Connect(StatusBar_SetText, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStatusText'));
     $this->Connect(StatusBar_PushText, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnPushStatusText'));
     $this->Connect(StatusBar_PopText, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnPopStatusText'));
     $this->Connect(StatusBar_SetFont, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStatusFont'));
     $this->Connect(StatusBar_ResetFieldsWidth, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnResetFieldsWidth'));
     $this->Connect(StatusBar_ShowFieldsRect, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnShowFieldsRect'));
     $this->Connect(StatusBar_Recreate, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnRecreateStatusBar'));
     $this->Connect(StatusBar_About, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnAbout'));
     $this->Connect(StatusBar_Toggle, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnStatusBarToggle'));
     $this->Connect(StatusBar_SetPaneStyleNormal, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetPaneStyle'));
     $this->Connect(StatusBar_SetPaneStyleFlat, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetPaneStyle'));
     $this->Connect(StatusBar_SetPaneStyleRaised, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetPaneStyle'));
     $this->Connect(StatusBar_SetStyleSizeGrip, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStyle'));
     $this->Connect(StatusBar_SetStyleEllipsizeStart, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStyle'));
     $this->Connect(StatusBar_SetStyleEllipsizeMiddle, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStyle'));
     $this->Connect(StatusBar_SetStyleEllipsizeEnd, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStyle'));
     $this->Connect(StatusBar_SetStyleShowTips, wxEVT_COMMAND_MENU_SELECTED, array($this, 'OnSetStyle'));
     $this->Connect(StatusBar_SetFields, StatusBar_ResetFieldsWidth, wxEVT_UPDATE_UI, array($this, 'OnUpdateForDefaultStatusbar'));
     $this->Connect(StatusBar_Toggle, wxEVT_UPDATE_UI, array($this, "OnUpdateStatusBarToggle"));
     $this->Connect(StatusBar_SetPaneStyleNormal, StatusBar_SetPaneStyleRaised, wxEVT_UPDATE_UI, array($this, 'OnUpdateSetPaneStyle'));
     $this->Connect(StatusBar_SetStyleSizeGrip, StatusBar_SetStyleShowTips, wxEVT_UPDATE_UI, array($this, 'OnUpdateSetStyle'));
 }
コード例 #19
0
ファイル: ui_base.php プロジェクト: busyYaman/yapitool
 function __construct($parent = null)
 {
     parent::__construct($parent, wxID_ANY, "認證資訊編輯", wxDefaultPosition, new wxSize(300, 200), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL);
     $this->SetSizeHints(wxDefaultSize, wxDefaultSize);
     $fgSizer2 = new wxFlexGridSizer(0, 2, 0, 0);
     $fgSizer2->AddGrowableCol(1);
     $fgSizer2->AddGrowableRow(4);
     $fgSizer2->SetFlexibleDirection(wxBOTH);
     $fgSizer2->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
     $this->m_staticText7 = new wxStaticText($this, wxID_ANY, "YID", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText7->Wrap(-1);
     $fgSizer2->Add($this->m_staticText7, 0, wxALL | wxALIGN_RIGHT, 5);
     $this->text_YID = new wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $fgSizer2->Add($this->text_YID, 1, wxALL | wxEXPAND, 5);
     $this->m_staticText8 = new wxStaticText($this, wxID_ANY, "Partner ID", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText8->Wrap(-1);
     $fgSizer2->Add($this->m_staticText8, 0, wxALL | wxALIGN_RIGHT, 5);
     $this->text_PartnerID = new wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $fgSizer2->Add($this->text_PartnerID, 1, wxALL | wxEXPAND, 5);
     $this->m_staticText9 = new wxStaticText($this, wxID_ANY, "Partner Secret", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText9->Wrap(-1);
     $fgSizer2->Add($this->m_staticText9, 0, wxALL | wxALIGN_RIGHT, 5);
     $this->text_PartnerSecret = new wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $fgSizer2->Add($this->text_PartnerSecret, 1, wxALL | wxEXPAND, 5);
     $this->m_staticText10 = new wxStaticText($this, wxID_ANY, "Seller ID", wxDefaultPosition, wxDefaultSize, 0);
     $this->m_staticText10->Wrap(-1);
     $fgSizer2->Add($this->m_staticText10, 0, wxALL | wxALIGN_RIGHT, 5);
     $this->text_SellerID = new wxTextCtrl($this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
     $fgSizer2->Add($this->text_SellerID, 1, wxALL | wxEXPAND, 5);
     $fgSizer2->Add(0, 0, 1, wxEXPAND, 5, null);
     $fgSizer2->Add(0, 0, 1, wxEXPAND, 5, null);
     $fgSizer2->Add(0, 0, 1, wxEXPAND, 5, null);
     $this->btn_Save = new wxButton($this, wxID_ANY, "確定儲存 (Save)", wxDefaultPosition, wxDefaultSize, 0);
     $fgSizer2->Add($this->btn_Save, 0, wxALL | wxALIGN_RIGHT | wxALIGN_BOTTOM, 5);
     $this->SetSizer($fgSizer2);
     $this->Layout();
     $this->Centre(wxBOTH);
     // Connect Events
     $this->Connect(wxEVT_CLOSE_WINDOW, array($this, "onWindowClose"));
     $this->btn_Save->Connect(wxEVT_COMMAND_BUTTON_CLICKED, array($this, "doTokenSave"));
 }