From 607d9061788c0277705f9c9c16ca00a22b019918 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 22 Jun 1998 22:48:22 +0000 Subject: [PATCH] Added more flags to resource.cpp, #ifdefed out ScanfV for Windows, some grid typo fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/resource.cpp | 99 +++++++++++++++++++++++++++++++++-------- src/common/string.cpp | 22 +++++++++ src/common/tbarsmpl.cpp | 12 ----- src/generic/gridg.cpp | 4 +- 4 files changed, 105 insertions(+), 32 deletions(-) diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 785d7b8014..8d50e743ea 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -1770,14 +1770,19 @@ static wxResourceBitListStruct wxResourceBitListTable[] = { "wxLB_NEEDED_SB", wxLB_NEEDED_SB }, { "wxLB_ALWAYS_SB", wxLB_ALWAYS_SB }, { "wxLB_SORT", wxLB_SORT }, + { "wxLB_OWNERDRAW", wxLB_OWNERDRAW }, + { "wxLB_HSCROLL", wxLB_HSCROLL }, /* wxComboxBox */ { "wxCB_SIMPLE", wxCB_SIMPLE }, { "wxCB_DROPDOWN", wxCB_DROPDOWN }, + { "wxCB_READONLY", wxCB_READONLY }, { "wxCB_SORT", wxCB_SORT }, /* wxGauge */ { "wxGA_PROGRESSBAR", wxGA_PROGRESSBAR }, + { "wxGA_HORIZONTAL", wxGA_HORIZONTAL }, + { "wxGA_VERTICAL", wxGA_VERTICAL }, /* wxTextCtrl */ { "wxPASSWORD", wxPASSWORD}, @@ -1785,16 +1790,80 @@ static wxResourceBitListStruct wxResourceBitListTable[] = { "wxTE_PASSWORD", wxTE_PASSWORD}, { "wxTE_READONLY", wxTE_READONLY}, { "wxTE_PROCESS_ENTER", wxTE_PROCESS_ENTER}, + { "wxTE_MULTILINE", wxTE_MULTILINE}, - /* wxRadioButton */ + /* wxRadioBox/wxRadioButton */ { "wxRB_GROUP", wxRB_GROUP }, - - /* wxItem */ + { "wxRA_HORIZONTAL", wxRA_HORIZONTAL }, + { "wxRA_VERTICAL", wxRA_VERTICAL }, + + /* wxSlider */ + { "wxSL_HORIZONTAL", wxSL_HORIZONTAL }, + { "wxSL_VERTICAL", wxSL_VERTICAL }, + { "wxSL_AUTOTICKS", wxSL_AUTOTICKS }, + { "wxSL_LABELS", wxSL_LABELS }, + { "wxSL_LEFT", wxSL_LEFT }, + { "wxSL_TOP", wxSL_TOP }, + { "wxSL_RIGHT", wxSL_RIGHT }, + { "wxSL_BOTTOM", wxSL_BOTTOM }, + { "wxSL_BOTH", wxSL_BOTH }, + { "wxSL_SELRANGE", wxSL_SELRANGE }, + + /* wxScrollBar */ + { "wxSB_HORIZONTAL", wxSB_HORIZONTAL }, + { "wxSB_VERTICAL", wxSB_VERTICAL }, + + /* wxButton */ + { "wxBU_AUTODRAW", wxBU_AUTODRAW }, + { "wxBU_NOAUTODRAW", wxBU_NOAUTODRAW }, + + /* wxTreeCtrl */ + { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS }, + { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS }, + + /* wxListCtrl */ + { "wxLC_ICON", wxLC_ICON }, + { "wxLC_SMALL_ICON", wxLC_SMALL_ICON }, + { "wxLC_LIST", wxLC_LIST }, + { "wxLC_REPORT", wxLC_REPORT }, + { "wxLC_ALIGN_TOP", wxLC_ALIGN_TOP }, + { "wxLC_ALIGN_LEFT", wxLC_ALIGN_LEFT }, + { "wxLC_AUTOARRANGE", wxLC_AUTOARRANGE }, + { "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 }, + { "wxLC_SINGLE_SEL", wxLC_SINGLE_SEL }, + { "wxLC_SORT_ASCENDING", wxLC_SORT_ASCENDING }, + { "wxLC_SORT_DESCENDING", wxLC_SORT_DESCENDING }, + + /* wxSpinButton */ + { "wxSP_VERTICAL", wxSP_VERTICAL}, + { "wxSP_HORIZONTAL", wxSP_HORIZONTAL}, + { "wxSP_ARROW_KEYS", wxSP_ARROW_KEYS}, + { "wxSP_WRAP", wxSP_WRAP}, + + /* wxSplitterWnd */ + { "wxSP_NOBORDER", wxSP_NOBORDER}, + { "wxSP_3D", wxSP_3D}, + { "wxSP_BORDER", wxSP_BORDER}, + + /* wxTabCtrl */ + { "wxTC_MULTILINE", wxTC_MULTILINE}, + { "wxTC_RIGHTJUSTIFY", wxTC_RIGHTJUSTIFY}, + { "wxTC_FIXEDWIDTH", wxTC_FIXEDWIDTH}, + { "wxTC_OWNERDRAW", wxTC_OWNERDRAW}, + + /* wxStatusBar95 */ + { "wxST_SIZEGRIP", wxST_SIZEGRIP}, + + /* wxControl */ { "wxFIXED_LENGTH", wxFIXED_LENGTH}, { "wxALIGN_LEFT", wxALIGN_LEFT}, { "wxALIGN_CENTER", wxALIGN_CENTER}, { "wxALIGN_CENTRE", wxALIGN_CENTRE}, { "wxALIGN_RIGHT", wxALIGN_RIGHT}, + { "wxCOLOURED", wxCOLOURED}, /* wxToolBar */ { "wxTB_3DBUTTONS", wxTB_3DBUTTONS}, @@ -1827,22 +1896,16 @@ static wxResourceBitListStruct wxResourceBitListTable[] = { "wxBACKINGSTORE", wxBACKINGSTORE}, // { "wxFLAT", wxFLAT}, // { "wxMOTIF_RESIZE", wxMOTIF_RESIZE}, - { "wxFIXED_LENGTH", wxFIXED_LENGTH}, + { "wxFIXED_LENGTH", 0}, + { "wxDOUBLE_BORDER", wxDOUBLE_BORDER}, + { "wxSUNKEN_BORDER", wxSUNKEN_BORDER}, + { "wxRAISED_BORDER", wxRAISED_BORDER}, + { "wxSIMPLE_BORDER", wxSIMPLE_BORDER}, + { "wxSTATIC_BORDER", wxSTATIC_BORDER}, + { "wxTRANSPARENT_WINDOW", wxTRANSPARENT_WINDOW}, + { "wxNO_BORDER", wxNO_BORDER}, + { "wxCLIP_CHILDREN", wxCLIP_CHILDREN}, -#if USE_ENHANCED_DIALOG - // Enhanced dialog - { "wxBOTTOM_COMMANDS", wxBOTTOM_COMMANDS}, - { "wxRIGHT_COMMANDS", wxRIGHT_COMMANDS}, - { "wxSTATUS_FOOTER", wxSTATUS_FOOTER}, - { "wxNO_STATUS_FOOTER", wxNO_STATUS_FOOTER}, - { "wxNO_CANCEL_BUTTON", wxNO_CANCEL_BUTTON}, - { "wxCANCEL_BUTTON_FIRST", wxCANCEL_BUTTON_FIRST}, - { "wxCANCEL_BUTTON_SECOND", wxCANCEL_BUTTON_SECOND}, - { "wxCANCEL_BUTTON_LAST", wxCANCEL_BUTTON_LAST}, - { "wxENH_DEFAULT", wxENH_DEFAULT}, -#endif - - { "wxCOLOURED", wxCOLOURED}, { "wxTINY_CAPTION_HORIZ", wxTINY_CAPTION_HORIZ}, { "wxTINY_CAPTION_VERT", wxTINY_CAPTION_VERT}, diff --git a/src/common/string.cpp b/src/common/string.cpp index 913693a80a..6247bb0fab 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -862,6 +862,28 @@ int wxString::PrintfV(const char* pszFormat, va_list argptr) return iLen; } +int wxString::Scanf(const char *pszFormat, ...) const +{ + va_list argptr; + va_start(argptr, pszFormat); + + int iLen = ScanfV(pszFormat, argptr); + + va_end(argptr); + + return iLen; +} + +int wxString::ScanfV(const char *pszFormat, va_list argptr) const +{ +#ifdef __WINDOWS__ + wxMessageBox("ScanfV not implemented"); + return 0; +#else + return vsscanf(c_str(), pszFormat, argptr); +#endif +} + // --------------------------------------------------------------------------- // standard C++ library string functions // --------------------------------------------------------------------------- diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp index b14e1ee2b5..52c9acf8b1 100644 --- a/src/common/tbarsmpl.cpp +++ b/src/common/tbarsmpl.cpp @@ -119,18 +119,6 @@ void wxToolBarSimple::OnPaint (wxPaintEvent& event) DrawTool(dc, mem_dc, tool); } -/* Old code which drew a line beneath the toolbar - not generally - * wanted. - int w, h; - GetClientSize( &w, &h ); - wxPen * old_pen = dc.GetPen(); - dc.SetPen( *white_pen ); - dc.DrawLine(0,0,w,0); - dc.SetPen( *black_pen ); - dc.DrawLine(0,(h-1),w,(h-1)); - dc.SetPen( *old_pen ); -*/ - count--; } diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index 2043f5e7a2..08e7aeef4b 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -195,7 +195,7 @@ bool wxGenericGrid::Create(wxWindow *parent, const wxWindowID id, const wxPoint& textItem->GetSize(&controlW, &controlH); editControlPosition.height = controlH; - topOfSheet = editControlPosition.x + controlH + 2; + topOfSheet = editControlPosition.y + controlH + 2; bEditCreated = TRUE; @@ -330,7 +330,7 @@ void wxGenericGrid::UpdateDimensions(void) { int controlW, controlH; GetTextItem()->GetSize(&controlW, &controlH); - topOfSheet = editControlPosition.x + controlH + 2; + topOfSheet = editControlPosition.y + controlH + 2; } else topOfSheet = 0; -- 2.45.2