]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/render/render.cpp
fixes potential crash under gatekeeper
[wxWidgets.git] / samples / render / render.cpp
index c5833775490574bfc592e43fce877d9bf98ceadd..49e35fc1fb675174825f5d6f5d17789d96011412 100644 (file)
@@ -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__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
     #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");