Changed instal path for setup.h
changed socket stream inheritance to virtual removed a few more warnings from the samples corrected thread habdling in configure.in removed dancing sliders from scrollbars corrected notebook send event bug and added it the controls sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,6 +58,7 @@ class MyPanel: public wxPanel
|
||||
void OnRadio( wxCommandEvent &event );
|
||||
void OnRadioButtons( wxCommandEvent &event );
|
||||
void OnSetFont( wxCommandEvent &event );
|
||||
void OnPageChanged( wxNotebookEvent &event );
|
||||
|
||||
wxListBox *m_listbox;
|
||||
wxChoice *m_choice;
|
||||
@@ -171,37 +172,38 @@ const ID_RADIOBOX_ENABLE = 164;
|
||||
const ID_SET_FONT = 170;
|
||||
|
||||
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
||||
EVT_SIZE ( MyPanel::OnSize)
|
||||
EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox)
|
||||
EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_SEL_STR, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons)
|
||||
EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons)
|
||||
EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice)
|
||||
EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_SEL_STR, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_CLEAR, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_APPEND, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons)
|
||||
EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons)
|
||||
EVT_CHOICE (ID_COMBO, MyPanel::OnCombo)
|
||||
EVT_BUTTON (ID_COMBO_SEL_NUM, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_SEL_STR, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_CLEAR, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_APPEND, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_DELETE, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_FONT, MyPanel::OnComboButtons)
|
||||
EVT_CHECKBOX (ID_COMBO_ENABLE, MyPanel::OnComboButtons)
|
||||
EVT_RADIOBOX (ID_RADIOBOX, MyPanel::OnRadio)
|
||||
EVT_BUTTON (ID_RADIOBOX_SEL_NUM, MyPanel::OnRadioButtons)
|
||||
EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyPanel::OnRadioButtons)
|
||||
EVT_BUTTON (ID_RADIOBOX_FONT, MyPanel::OnRadioButtons)
|
||||
EVT_CHECKBOX (ID_RADIOBOX_ENABLE, MyPanel::OnRadioButtons)
|
||||
EVT_BUTTON (ID_SET_FONT, MyPanel::OnSetFont)
|
||||
EVT_SIZE ( MyPanel::OnSize)
|
||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, MyPanel::OnPageChanged)
|
||||
EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox)
|
||||
EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_SEL_STR, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons)
|
||||
EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons)
|
||||
EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons)
|
||||
EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice)
|
||||
EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_SEL_STR, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_CLEAR, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_APPEND, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons)
|
||||
EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons)
|
||||
EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons)
|
||||
EVT_CHOICE (ID_COMBO, MyPanel::OnCombo)
|
||||
EVT_BUTTON (ID_COMBO_SEL_NUM, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_SEL_STR, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_CLEAR, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_APPEND, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_DELETE, MyPanel::OnComboButtons)
|
||||
EVT_BUTTON (ID_COMBO_FONT, MyPanel::OnComboButtons)
|
||||
EVT_CHECKBOX (ID_COMBO_ENABLE, MyPanel::OnComboButtons)
|
||||
EVT_RADIOBOX (ID_RADIOBOX, MyPanel::OnRadio)
|
||||
EVT_BUTTON (ID_RADIOBOX_SEL_NUM, MyPanel::OnRadioButtons)
|
||||
EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyPanel::OnRadioButtons)
|
||||
EVT_BUTTON (ID_RADIOBOX_FONT, MyPanel::OnRadioButtons)
|
||||
EVT_CHECKBOX (ID_RADIOBOX_ENABLE, MyPanel::OnRadioButtons)
|
||||
EVT_BUTTON (ID_SET_FONT, MyPanel::OnSetFont)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
|
||||
@@ -303,6 +305,11 @@ void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) )
|
||||
if (m_text) m_text->SetSize( 2, y*2/3+2, x-4, y/3-4 );
|
||||
}
|
||||
|
||||
void MyPanel::OnPageChanged( wxNotebookEvent &event )
|
||||
{
|
||||
*m_text << "Notebook selection is " << event.GetSelection() << "\n";
|
||||
}
|
||||
|
||||
void MyPanel::OnListBox( wxCommandEvent &event )
|
||||
{
|
||||
m_text->WriteText( "ListBox selection string is: " );
|
||||
|
@@ -149,7 +149,7 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
|
||||
SetIcon(wxIcon(mondrian_xpm));
|
||||
#endif
|
||||
|
||||
const int widths[] = { -1 };
|
||||
// const int widths[] = { -1 };
|
||||
CreateStatusBar();
|
||||
|
||||
// construct menu
|
||||
|
@@ -62,7 +62,7 @@ PlayerSelectionDialog::PlayerSelectionDialog(
|
||||
|
||||
wxArrayString players;
|
||||
m_scoreFile->GetPlayerList(players);
|
||||
for (int i = 0; i < players.Count(); i++)
|
||||
for (unsigned int i = 0; i < players.Count(); i++)
|
||||
{
|
||||
list->Append(players[i]);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ PlayerSelectionDialog::~PlayerSelectionDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void PlayerSelectionDialog::OnSize(wxSizeEvent& event)
|
||||
void PlayerSelectionDialog::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
{
|
||||
Layout();
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) :
|
||||
ostrstream os;
|
||||
|
||||
os << "Player\tWins\tGames\tScore\n";
|
||||
for (int i = 0; i < players.Count(); i++)
|
||||
for (unsigned int i = 0; i < players.Count(); i++)
|
||||
{
|
||||
int wins, games, score;
|
||||
scoreFile->ReadPlayersScore(players[i], wins, games, score);
|
||||
|
@@ -161,7 +161,7 @@ bool MyApp::OnInit(void)
|
||||
{
|
||||
char buf[20];
|
||||
sprintf(buf, "Item %d", i);
|
||||
long tmp = frame->m_listCtrl->InsertItem(i, buf);
|
||||
frame->m_listCtrl->InsertItem(i, buf);
|
||||
}
|
||||
|
||||
frame->CreateStatusBar(3);
|
||||
@@ -230,7 +230,7 @@ void MyFrame::OnListView(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
char buf[20];
|
||||
sprintf(buf, "Item %d", i);
|
||||
long tmp = m_listCtrl->InsertItem(i, buf);
|
||||
m_listCtrl->InsertItem(i, buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
for ( int i=0; i < 9; i++)
|
||||
{
|
||||
long tmp = m_listCtrl->InsertItem(i, i);
|
||||
m_listCtrl->InsertItem(i, i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ void MyFrame::OnIconTextView(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
char buf[20];
|
||||
sprintf(buf, "Label %d", i);
|
||||
long tmp = m_listCtrl->InsertItem(i, buf, i);
|
||||
m_listCtrl->InsertItem(i, buf, i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ void MyFrame::OnSmallIconView(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
for ( int i=0; i < 9; i++)
|
||||
{
|
||||
long tmp = m_listCtrl->InsertItem(i, 0);
|
||||
m_listCtrl->InsertItem(i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,13 +310,13 @@ void MyFrame::OnSmallIconTextView(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
for ( int i=0; i < 9; i++)
|
||||
{
|
||||
long tmp = m_listCtrl->InsertItem(i, "Label", 0);
|
||||
m_listCtrl->InsertItem(i, "Label", 0);
|
||||
}
|
||||
}
|
||||
|
||||
// MyListCtrl
|
||||
|
||||
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||
void MyListCtrl::OnBeginDrag(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -333,7 +333,7 @@ void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnBeginRDrag(wxListEvent& event)
|
||||
void MyListCtrl::OnBeginRDrag(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -349,7 +349,7 @@ void MyListCtrl::OnBeginRDrag(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
|
||||
void MyListCtrl::OnBeginLabelEdit(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -366,7 +366,7 @@ void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
||||
void MyListCtrl::OnEndLabelEdit(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -383,7 +383,7 @@ void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnDeleteItem(wxListEvent& event)
|
||||
void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -437,7 +437,7 @@ void MyListCtrl::OnGetInfo(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnSetInfo(wxListEvent& event)
|
||||
void MyListCtrl::OnSetInfo(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -454,7 +454,7 @@ void MyListCtrl::OnSetInfo(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnSelected(wxListEvent& event)
|
||||
void MyListCtrl::OnSelected(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -471,7 +471,7 @@ void MyListCtrl::OnSelected(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnDeselected(wxListEvent& event)
|
||||
void MyListCtrl::OnDeselected(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
@@ -488,7 +488,7 @@ void MyListCtrl::OnDeselected(wxListEvent& event)
|
||||
#endif
|
||||
}
|
||||
|
||||
void MyListCtrl::OnKeyDown(wxListEvent& event)
|
||||
void MyListCtrl::OnKeyDown(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
if ( !wxGetApp().GetTopWindow() )
|
||||
return;
|
||||
|
@@ -59,8 +59,9 @@ bool MyApp::OnInit(void)
|
||||
MyFrame *frame = new MyFrame((wxFrame *) NULL);
|
||||
|
||||
// Give it an icon
|
||||
#ifdef wx_msw
|
||||
#ifdef __WXMSW__
|
||||
frame->SetIcon(wxIcon("mondrian"));
|
||||
#else
|
||||
frame->SetIcon(wxIcon(mondrian_xpm));
|
||||
#endif
|
||||
|
||||
@@ -113,7 +114,7 @@ MyFrame::MyFrame(wxFrame *parent):
|
||||
{}
|
||||
|
||||
// Intercept menu commands
|
||||
void MyFrame::OnQuit(wxCommandEvent& event)
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close(TRUE);
|
||||
}
|
||||
|
@@ -79,7 +79,8 @@ bool MyApp::OnInit(void)
|
||||
|
||||
// Force a resize. This should probably be replaced by a call to a wxFrame
|
||||
// function that lays out default decorations and the remaining content window.
|
||||
frame->OnSize(wxSizeEvent(wxSize(-1, -1), frame->GetId()));
|
||||
wxSizeEvent event(wxSize(-1, -1), frame->GetId());
|
||||
frame->OnSize(event);
|
||||
frame->Show(TRUE);
|
||||
|
||||
frame->SetStatusText("Hello, wxWindows");
|
||||
|
@@ -75,29 +75,29 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
|
||||
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
|
||||
{}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent& event)
|
||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close(TRUE);
|
||||
}
|
||||
|
||||
void MyFrame::OnTestDialog(wxCommandEvent& event)
|
||||
void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
MyDialog dialog(this, "Validation test dialog", wxPoint(100, 100), wxSize(340, 170));
|
||||
|
||||
dialog.ShowModal();
|
||||
}
|
||||
|
||||
MyDialog::MyDialog(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
const long style):
|
||||
MyDialog::MyDialog( wxWindow *parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size, const long WXUNUSED(style) ) :
|
||||
wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
|
||||
{
|
||||
wxButton *but1 = new wxButton(this, wxID_OK, "OK", wxPoint(250, 10), wxSize(80, 30));
|
||||
wxButton *but2 = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30));
|
||||
(void)new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30));
|
||||
|
||||
wxTextCtrl *txt1 = new wxTextCtrl(this, VALIDATE_TEXT, "",
|
||||
(void)new wxTextCtrl(this, VALIDATE_TEXT, "",
|
||||
wxPoint(10, 10), wxSize(120, -1), 0, wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
|
||||
|
||||
// SetBackgroundColour(wxColour(0,0,255));
|
||||
SetBackgroundColour(wxColour(0,0,255));
|
||||
|
||||
but1->SetFocus();
|
||||
but1->SetDefault();
|
||||
|
Reference in New Issue
Block a user