]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/treectrl/treetest.cpp
Ifdef'd out sample code for wxStaticBitmap. It's not working under
[wxWidgets.git] / samples / treectrl / treetest.cpp
index 6b585f079cefdaf1b3f52bc32d98b724d4d329f7..8335f176b7604a75b60fe7a432b5c17ae61c0c28 100644 (file)
 
 #include "math.h"
 
-#ifdef __WXMSW__
-    //#define NO_MULTIPLE_SELECTION
+//#ifdef __WXMSW__
+    #define NO_MULTIPLE_SELECTION
     #define NO_VARIABLE_HEIGHT
-#endif
+//#endif
 
 #include "treetest.h"
 
 // under Windows the icons are in the .rc file
 #ifndef __WXMSW__
+#ifdef NO_VARIABLE_HEIGHT
   #include "icon1.xpm"
+#endif
   #include "icon2.xpm"
   #include "mondrian.xpm"
 #endif
@@ -184,9 +186,13 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h)
                                 wxDefaultPosition, wxDefaultSize,
                                 wxTR_HAS_BUTTONS |
                                 wxTR_EDIT_LABELS |
-                                wxTR_MULTIPLE |
-                                wxTR_HAS_VARIABLE_ROW_HEIGHT |
-                                wxSUNKEN_BORDER);
+#ifndef NO_MULTIPLE_SELECTION
+                               wxTR_MULTIPLE |
+#endif
+#ifndef NO_VARIABLE_HEIGHT
+                               wxTR_HAS_VARIABLE_ROW_HEIGHT |
+#endif
+                               wxSUNKEN_BORDER);
     wxTextCtrl *textCtrl = new wxTextCtrl(this, -1, "",
                                 wxDefaultPosition, wxDefaultSize,
                                 wxTE_MULTILINE | wxSUNKEN_BORDER);
@@ -410,11 +416,13 @@ MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
                        long style)
           : wxTreeCtrl(parent, id, pos, size, style)
 {
-#if (USE_TR_HAS_VARIABLE_ROW_HIGHT && wxUSE_LIBJPEG)
+#ifndef NO_VARIABLE_HEIGHT
+#if wxUSE_LIBJPEG
     wxImage::AddHandler(new wxJPEGHandler);
     wxImage image;
 
     image.LoadFile(wxString("horse.jpg"), wxBITMAP_TYPE_JPEG );
+#endif
 #endif
 
     m_reverseSort = FALSE;
@@ -426,14 +434,14 @@ MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
 #if defined(__WXMSW__) && defined(__WIN16__)
     // This is required in 16-bit Windows mode only because we can't load a specific (16x16)
     // icon image, so it comes out stretched
-#  if USE_TR_HAS_VARIABLE_ROW_HIGHT
+#  ifndef NO_VARIABLE_HEIGHT
     m_imageListNormal->Add(image.ConvertToBitmap());
 #  else
     m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE));
 #  endif
     m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE));
 #else
-#  if USE_TR_HAS_VARIABLE_ROW_HIGHT
+#  ifndef NO_VARIABLE_HEIGHT
     m_imageListNormal->Add(image.ConvertToBitmap());
 #  else
     m_imageListNormal->Add(wxICON(icon1));