A few more changes to traydict
Originally committed to SVN as r1632.
This commit is contained in:
parent
6b74afd8d9
commit
5859b4c9c0
3 changed files with 30 additions and 13 deletions
|
@ -63,11 +63,13 @@ DictWindow::DictWindow()
|
||||||
//bar->SetStatusWidths(3,widths);
|
//bar->SetStatusWidths(3,widths);
|
||||||
|
|
||||||
// Panel
|
// Panel
|
||||||
panel = new wxPanel(this);
|
wxPanel *panel = new wxPanel(this);
|
||||||
|
|
||||||
// Controls
|
// Manager
|
||||||
entry = new wxTextCtrl(panel,ENTRY_FIELD,_T(""),wxDefaultPosition,wxDefaultSize,wxTE_PROCESS_ENTER);
|
manager = new wxAuiManager(this);
|
||||||
results = new wxTextCtrl(panel,-1,_T(""),wxDefaultPosition,wxSize(280,400),wxTE_RICH2 | wxTE_MULTILINE | wxTE_DONTWRAP | wxTE_READONLY);
|
|
||||||
|
// Search bar
|
||||||
|
entry = new wxComboBox(panel,ENTRY_FIELD,_T(""),wxDefaultPosition,wxDefaultSize,0,NULL,wxCB_DROPDOWN | wxTE_PROCESS_ENTER);
|
||||||
wxButton *searchButton = new wxButton(panel,BUTTON_SEARCH,_T("Search"),wxDefaultPosition,wxSize(80,-1));
|
wxButton *searchButton = new wxButton(panel,BUTTON_SEARCH,_T("Search"),wxDefaultPosition,wxSize(80,-1));
|
||||||
wxSizer *entrySizer = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *entrySizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
entrySizer->Add(entry,1,wxEXPAND | wxRIGHT,5);
|
entrySizer->Add(entry,1,wxEXPAND | wxRIGHT,5);
|
||||||
|
@ -103,12 +105,24 @@ DictWindow::DictWindow()
|
||||||
optionsSizer->Add(checkJplaces,0,wxCENTER | wxRIGHT,0);
|
optionsSizer->Add(checkJplaces,0,wxCENTER | wxRIGHT,0);
|
||||||
optionsSizer->AddStretchSpacer(1);
|
optionsSizer->AddStretchSpacer(1);
|
||||||
|
|
||||||
// Main sizer
|
// Upper pane
|
||||||
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
wxSizer *searchSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
mainSizer->Add(entrySizer,0,wxEXPAND | wxALL,5);
|
searchSizer->Add(entrySizer,0,wxEXPAND | wxALL,5);
|
||||||
mainSizer->Add(optionsSizer,0,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5);
|
searchSizer->Add(optionsSizer,0,wxEXPAND | wxALL,5);
|
||||||
mainSizer->Add(results,1,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5);
|
panel->SetSizer(searchSizer);
|
||||||
panel->SetSizer(mainSizer);
|
manager->AddPane(panel,wxTOP,_("Search"));
|
||||||
|
wxAuiPaneInfo &searchPane = manager->GetPane(panel);
|
||||||
|
searchPane.MinSize(searchSizer->GetMinSize());
|
||||||
|
searchPane.FloatingSize(searchSizer->GetMinSize());
|
||||||
|
searchPane.Resizable(false);
|
||||||
|
searchPane.RightDockable(false);
|
||||||
|
searchPane.LeftDockable(false);
|
||||||
|
searchPane.CloseButton(false);
|
||||||
|
|
||||||
|
// Results
|
||||||
|
results = new wxTextCtrl(this,-1,_T(""),wxDefaultPosition,wxSize(280,400),wxTE_RICH2 | wxTE_MULTILINE | wxTE_DONTWRAP | wxTE_READONLY);
|
||||||
|
manager->AddPane(results,wxCENTER,_("Results"));
|
||||||
|
manager->Update();
|
||||||
|
|
||||||
// Create dictionary files
|
// Create dictionary files
|
||||||
if (false) {
|
if (false) {
|
||||||
|
@ -158,7 +172,7 @@ BEGIN_EVENT_TABLE(DictWindow,wxFrame)
|
||||||
EVT_BUTTON(BUTTON_SEARCH,DictWindow::OnSearch)
|
EVT_BUTTON(BUTTON_SEARCH,DictWindow::OnSearch)
|
||||||
EVT_TEXT_ENTER(ENTRY_FIELD,DictWindow::OnSearch)
|
EVT_TEXT_ENTER(ENTRY_FIELD,DictWindow::OnSearch)
|
||||||
EVT_HOTKEY(HOTKEY_ID,DictWindow::OnHotkey)
|
EVT_HOTKEY(HOTKEY_ID,DictWindow::OnHotkey)
|
||||||
EVT_CLOSE(DictWindow::OnClose)
|
//EVT_CLOSE(DictWindow::OnClose)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
///////////
|
///////////
|
||||||
// Headers
|
// Headers
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <wx/aui/aui.h>
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
//////////////
|
||||||
|
@ -64,8 +65,8 @@ private:
|
||||||
void Search(wxString text);
|
void Search(wxString text);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxTextCtrl *entry;
|
wxAuiManager *manager;
|
||||||
wxPanel *panel;
|
wxComboBox *entry;
|
||||||
wxCheckBox *checkKanji;
|
wxCheckBox *checkKanji;
|
||||||
wxCheckBox *checkKana;
|
wxCheckBox *checkKana;
|
||||||
wxCheckBox *checkRomaji;
|
wxCheckBox *checkRomaji;
|
||||||
|
|
|
@ -65,6 +65,7 @@ IMPLEMENT_APP(TrayDict)
|
||||||
#pragma comment(lib, "wxmsw28ud_media.lib")
|
#pragma comment(lib, "wxmsw28ud_media.lib")
|
||||||
#pragma comment(lib, "wxmsw28ud_core.lib")
|
#pragma comment(lib, "wxmsw28ud_core.lib")
|
||||||
#pragma comment(lib, "wxmsw28ud_adv.lib")
|
#pragma comment(lib, "wxmsw28ud_adv.lib")
|
||||||
|
#pragma comment(lib, "wxmsw28ud_aui.lib")
|
||||||
#pragma comment(lib, "wxbase28ud_xml.lib")
|
#pragma comment(lib, "wxbase28ud_xml.lib")
|
||||||
#pragma comment(lib, "wxexpatd.lib")
|
#pragma comment(lib, "wxexpatd.lib")
|
||||||
#else
|
#else
|
||||||
|
@ -74,6 +75,7 @@ IMPLEMENT_APP(TrayDict)
|
||||||
#pragma comment(lib, "wxmsw28u_media.lib")
|
#pragma comment(lib, "wxmsw28u_media.lib")
|
||||||
#pragma comment(lib, "wxmsw28u_core.lib")
|
#pragma comment(lib, "wxmsw28u_core.lib")
|
||||||
#pragma comment(lib, "wxmsw28u_adv.lib")
|
#pragma comment(lib, "wxmsw28u_adv.lib")
|
||||||
|
#pragma comment(lib, "wxmsw28u_aui.lib")
|
||||||
#pragma comment(lib, "wxbase28u_xml.lib")
|
#pragma comment(lib, "wxbase28u_xml.lib")
|
||||||
#pragma comment(lib, "wxexpat.lib")
|
#pragma comment(lib, "wxexpat.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue