]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resourc2.cpp
install wxUniv headers in make install and include wxUniv sources in make dist
[wxWidgets.git] / src / common / resourc2.cpp
index cab337e43786977f729b0ccc196c4fa14eb64fb6..3b378ec0020dbb60da3f1f0ea3662156c76f1b45 100644 (file)
@@ -422,7 +422,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxLB_EXTENDED", wxLB_EXTENDED },
   { "wxLB_NEEDED_SB", wxLB_NEEDED_SB },
   { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB },
-  { "wxLB_SORT(", wxLB_SORT },
+  { "wxLB_SORT", wxLB_SORT },
   { "wxLB_OWNERDRAW", wxLB_OWNERDRAW },
   { "wxLB_HSCROLL", wxLB_HSCROLL },
 
@@ -430,7 +430,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxCB_SIMPLE", wxCB_SIMPLE },
   { "wxCB_DROPDOWN", wxCB_DROPDOWN },
   { "wxCB_READONLY", wxCB_READONLY },
-  { "wxCB_SORT(", wxCB_SORT },
+  { "wxCB_SORT", wxCB_SORT },
 
   /* wxGauge */
   { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR },
@@ -457,9 +457,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxSL_VERTICAL", wxSL_VERTICAL },
   { "wxSL_AUTOTICKS", wxSL_AUTOTICKS },
   { "wxSL_LABELS", wxSL_LABELS },
-  { "wxSL_LEFT(", wxSL_LEFT },
+  { "wxSL_LEFT", wxSL_LEFT },
   { "wxSL_TOP", wxSL_TOP },
-  { "wxSL_RIGHT(", wxSL_RIGHT },
+  { "wxSL_RIGHT", wxSL_RIGHT },
   { "wxSL_BOTTOM", wxSL_BOTTOM },
   { "wxSL_BOTH", wxSL_BOTH },
   { "wxSL_SELRANGE", wxSL_SELRANGE },
@@ -475,17 +475,17 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   /* wxTreeCtrl */
   { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS },
   { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS },
-  { "wxTR_LINES_AT_ROOT(", wxTR_LINES_AT_ROOT },
+  { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT },
 
   /* wxListCtrl */
   { "wxLC_ICON", wxLC_ICON },
   { "wxLC_SMALL_ICON", wxLC_SMALL_ICON },
-  { "wxLC_LIST(", wxLC_LIST },
-  { "wxLC_REPORT(", wxLC_REPORT },
+  { "wxLC_LIST", wxLC_LIST },
+  { "wxLC_REPORT", wxLC_REPORT },
   { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP },
-  { "wxLC_ALIGN_LEFT(", wxLC_ALIGN_LEFT },
+  { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT },
   { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE },
-  { "wxLC_USER_TEXT(", wxLC_USER_TEXT },
+  { "wxLC_USER_TEXT", wxLC_USER_TEXT },
   { "wxLC_EDIT_LABELS", wxLC_EDIT_LABELS },
   { "wxLC_NO_HEADER", wxLC_NO_HEADER },
   { "wxLC_NO_SORT_HEADER", wxLC_NO_SORT_HEADER },
@@ -515,17 +515,17 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
 
   /* wxControl */
   { "wxFIXED_LENGTH", wxFIXED_LENGTH},
-  { "wxALIGN_LEFT(", wxALIGN_LEFT},
+  { "wxALIGN_LEFT", wxALIGN_LEFT},
   { "wxALIGN_CENTER", wxALIGN_CENTER},
   { "wxALIGN_CENTRE", wxALIGN_CENTRE},
-  { "wxALIGN_RIGHT(", wxALIGN_RIGHT},
+  { "wxALIGN_RIGHT", wxALIGN_RIGHT},
   { "wxCOLOURED", wxCOLOURED},
 
   /* wxToolBar */
   { "wxTB_3DBUTTONS", wxTB_3DBUTTONS},
   { "wxTB_HORIZONTAL", wxTB_HORIZONTAL},
   { "wxTB_VERTICAL", wxTB_VERTICAL},
-  { "wxTB_FLAT(", wxTB_FLAT},
+  { "wxTB_FLAT", wxTB_FLAT},
 
   /* Generic */
   { "wxVSCROLL", wxVSCROLL },
@@ -536,7 +536,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxMINIMIZE", wxICONIZE},
   { "wxMAXIMIZE", wxMAXIMIZE},
   { "wxSDI", 0},
-  { "wxMDI_PARENT(", 0},
+  { "wxMDI_PARENT", 0},
   { "wxMDI_CHILD", 0},
   { "wxTHICK_FRAME", wxTHICK_FRAME},
   { "wxRESIZE_BORDER", wxRESIZE_BORDER},
@@ -552,7 +552,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxNATIVE_IMPL", 0},
   { "wxEXTENDED_IMPL", 0},
   { "wxBACKINGSTORE", wxBACKINGSTORE},
-//  { "wxFLAT(", wxFLAT},
+//  { "wxFLAT", wxFLAT},
 //  { "wxMOTIF_RESIZE", wxMOTIF_RESIZE},
   { "wxFIXED_LENGTH", 0},
   { "wxDOUBLE_BORDER", wxDOUBLE_BORDER},
@@ -565,30 +565,30 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxCLIP_CHILDREN", wxCLIP_CHILDREN},
 
   { "wxTINY_CAPTION_HORIZ", wxTINY_CAPTION_HORIZ},
-  { "wxTINY_CAPTION_VERT(", wxTINY_CAPTION_VERT},
+  { "wxTINY_CAPTION_VERT", wxTINY_CAPTION_VERT},
 
   // Text font families
-  { "wxDEFAULT(", wxDEFAULT},
+  { "wxDEFAULT", wxDEFAULT},
   { "wxDECORATIVE", wxDECORATIVE},
   { "wxROMAN", wxROMAN},
-  { "wxSCRIPT(", wxSCRIPT},
+  { "wxSCRIPT", wxSCRIPT},
   { "wxSWISS", wxSWISS},
   { "wxMODERN", wxMODERN},
   { "wxTELETYPE", wxTELETYPE},
   { "wxVARIABLE", wxVARIABLE},
   { "wxFIXED", wxFIXED},
   { "wxNORMAL", wxNORMAL},
-  { "wxLIGHT(", wxLIGHT},
+  { "wxLIGHT", wxLIGHT},
   { "wxBOLD", wxBOLD},
   { "wxITALIC", wxITALIC},
-  { "wxSLANT(", wxSLANT},
+  { "wxSLANT", wxSLANT},
   { "wxSOLID", wxSOLID},
-  { "wxDOT(", wxDOT},
+  { "wxDOT", wxDOT},
   { "wxLONG_DASH", wxLONG_DASH},
   { "wxSHORT_DASH", wxSHORT_DASH},
   { "wxDOT_DASH", wxDOT_DASH},
   { "wxUSER_DASH", wxUSER_DASH},
-  { "wxTRANSPARENT(", wxTRANSPARENT},
+  { "wxTRANSPARENT", wxTRANSPARENT},
   { "wxSTIPPLE", wxSTIPPLE},
   { "wxBDIAGONAL_HATCH", wxBDIAGONAL_HATCH},
   { "wxCROSSDIAG_HATCH", wxCROSSDIAG_HATCH},
@@ -601,25 +601,25 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
   { "wxJOIN_ROUND", wxJOIN_ROUND},
   { "wxCAP_ROUND", wxCAP_ROUND},
   { "wxCAP_PROJECTING", wxCAP_PROJECTING},
-  { "wxCAP_BUTT(", wxCAP_BUTT},
+  { "wxCAP_BUTT", wxCAP_BUTT},
 
   // Logical ops
   { "wxCLEAR", wxCLEAR},
   { "wxXOR", wxXOR},
-  { "wxINVERT(", wxINVERT},
+  { "wxINVERT", wxINVERT},
   { "wxOR_REVERSE", wxOR_REVERSE},
   { "wxAND_REVERSE", wxAND_REVERSE},
   { "wxCOPY", wxCOPY},
   { "wxAND", wxAND},
-  { "wxAND_INVERT(", wxAND_INVERT},
+  { "wxAND_INVERT", wxAND_INVERT},
   { "wxNO_OP", wxNO_OP},
   { "wxNOR", wxNOR},
   { "wxEQUIV", wxEQUIV},
-  { "wxSRC_INVERT(", wxSRC_INVERT},
-  { "wxOR_INVERT(", wxOR_INVERT},
+  { "wxSRC_INVERT", wxSRC_INVERT},
+  { "wxOR_INVERT", wxOR_INVERT},
   { "wxNAND", wxNAND},
   { "wxOR", wxOR},
-  { "wxSET(", wxSET},
+  { "wxSET", wxSET},
 
   { "wxFLOOD_SURFACE", wxFLOOD_SURFACE},
   { "wxFLOOD_BORDER", wxFLOOD_BORDER},
@@ -817,7 +817,6 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
       }
       case wxBITMAP_TYPE_XPM_DATA:
       {
-#if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
         wxItemResource *item = table->FindResource(name);
         if (!item)
         {
@@ -826,9 +825,6 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
           return wxNullBitmap;
         }
         return wxBitmap(item->GetValue1());
-#else
-        wxLogWarning(_("No XPM facility available!"));
-#endif
         break;
       }
       default:
@@ -974,7 +970,6 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
       {
       // *** XPM ICON NOT YET IMPLEMENTED IN WXWINDOWS ***
 /*
-#if (defined(__WXGTK__)) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
         wxItemResource *item = table->FindResource(name);
         if (!item)
         {
@@ -984,9 +979,6 @@ wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table)
           return NULL;
         }
         return wxIcon((char **)item->GetValue1());
-#else
-        wxLogWarning(_("No XPM facility available!"));
-#endif
 */
         wxLogWarning(_("No XPM icon facility available!"));
         break;
@@ -1521,7 +1513,7 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
   if ((resource->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
   {
     // No need to do this since it's done in wxPanel or wxDialog constructor.
-    // SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+    // SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
   }
   else
   {
@@ -1533,9 +1525,9 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
 
   // Should have some kind of font at this point
   if (!GetFont().Ok())
-      SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+      SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
   if (!GetBackgroundColour().Ok())
-      SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
+      SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
 
   // Only when we've created the window and set the font can we set the correct size,
   // if based on dialog units.
@@ -1545,6 +1537,10 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName,
     SetClientSize(sz.x, sz.y);
 
     wxPoint pt = ConvertDialogToPixels(wxPoint(x, y));
+    #ifdef __WXMAC__
+    int mbarheight = 2 * LMGetMBarHeight() ;
+               pt.y += mbarheight ;
+    #endif
     Move(pt.x, pt.y);
   }