X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/945178c70e2eba1d39ff8382b43825370b7ad894..c7e99122a0f181d199be3ec6c3928109c2bdf76b:/samples/render/render.cpp diff --git a/samples/render/render.cpp b/samples/render/render.cpp index c583377549..ae5c3bc4c7 100644 --- a/samples/render/render.cpp +++ b/samples/render/render.cpp @@ -47,7 +47,7 @@ // ---------------------------------------------------------------------------- // the application icon (under Windows and OS/2 it is in resources) -#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) #include "../sample.xpm" #endif @@ -124,6 +124,8 @@ private: { OnToggleDrawFlag(event, wxCONTROL_CHECKED); } void OnDrawHot(wxCommandEvent& event) { OnToggleDrawFlag(event, wxCONTROL_CURRENT); } + void OnDrawUndetermined(wxCommandEvent &event) + { OnToggleDrawFlag(event, wxCONTROL_UNDETERMINED); } void OnAlignLeft(wxCommandEvent& WXUNUSED(event)) { OnChangeAlign(wxALIGN_LEFT); } @@ -195,6 +197,8 @@ private: flagsString += "wxCONTROL_CURRENT "; if ( m_flags & wxCONTROL_CHECKED ) flagsString += "wxCONTROL_CHECKED "; + if ( m_flags & wxCONTROL_UNDETERMINED ) + flagsString += "wxCONTROL_UNDETERMINED "; if ( flagsString.empty() ) flagsString = "(none)"; dc.DrawText("Using flags: " + flagsString, x1, y); @@ -291,6 +295,7 @@ enum Render_DrawPressed, Render_DrawChecked, Render_DrawHot, + Render_DrawUndetermined, Render_AlignLeft, Render_AlignCentre, @@ -326,7 +331,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Render_DrawPressed, MyFrame::OnDrawPressed) EVT_MENU(Render_DrawChecked, MyFrame::OnDrawChecked) EVT_MENU(Render_DrawHot, MyFrame::OnDrawHot) - + EVT_MENU(Render_DrawUndetermined, MyFrame::OnDrawUndetermined) EVT_MENU(Render_AlignLeft, MyFrame::OnAlignLeft) EVT_MENU(Render_AlignCentre, MyFrame::OnAlignCentre) EVT_MENU(Render_AlignRight, MyFrame::OnAlignRight) @@ -405,6 +410,8 @@ MyFrame::MyFrame() "Draw in &checked state\tCtrl-C"); menuFile->AppendCheckItem(Render_DrawHot, "Draw in &hot state\tCtrl-H"); + menuFile->AppendCheckItem(Render_DrawUndetermined, + "Draw in unde&termined state\tCtrl-T"); menuFile->AppendSeparator(); menuFile->AppendRadioItem(Render_AlignLeft, "&Left align\tCtrl-1");