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")); }