From bbcdf8bc7ca806d8278c7cb6d09d5590378b67d8 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 7 Aug 1998 23:52:45 +0000 Subject: [PATCH] Fixed various wxMSW compile problems that came down the telephone line... plus wxTreeCtrl::EditLabel/EndEditLabel, dialog editor stuff, wxMSW header changes, doc changes. Sorry about the quantity :-( git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 85 +++++------ distrib/msw/gtk.rsp | 13 ++ distrib/msw/zipdist.bat | 30 ++-- docs/latex/wx/dialog.tex | 5 +- docs/latex/wx/treectrl.tex | 27 +++- include/wx/msw/app.h | 10 +- include/wx/msw/bitmap.h | 10 +- include/wx/msw/bmpbuttn.h | 10 +- include/wx/msw/brush.h | 10 +- include/wx/msw/button.h | 10 +- include/wx/msw/checkbox.h | 10 +- include/wx/msw/checklst.h | 6 +- include/wx/msw/choice.h | 20 +-- include/wx/msw/clipbrd.h | 10 +- include/wx/msw/colordlg.h | 35 ++--- include/wx/msw/colour.h | 8 +- include/wx/msw/combobox.h | 10 +- include/wx/msw/control.h | 10 +- include/wx/msw/curico.h | 4 +- include/wx/msw/cursor.h | 10 +- include/wx/msw/dc.h | 10 +- include/wx/msw/dcclient.h | 6 +- include/wx/msw/dcmemory.h | 10 +- include/wx/msw/dcprint.h | 10 +- include/wx/msw/dcscreen.h | 10 +- include/wx/msw/dde.h | 10 +- include/wx/msw/dialog.h | 6 +- include/wx/msw/dib.h | 4 +- include/wx/msw/dibutils.h | 2 +- include/wx/msw/dirdlg.h | 10 +- include/wx/msw/filedlg.h | 10 +- include/wx/msw/font.h | 10 +- include/wx/msw/fontdlg.h | 36 ++--- include/wx/msw/frame.h | 6 +- include/wx/msw/gauge.h | 10 +- include/wx/msw/gauge95.h | 4 +- include/wx/msw/gaugemsw.h | 4 +- include/wx/msw/gdiobj.h | 10 +- include/wx/msw/helpwin.h | 10 +- include/wx/msw/icon.h | 10 +- include/wx/msw/imaglist.h | 10 +- include/wx/msw/iniconf.h | 2 +- include/wx/msw/joystick.h | 10 +- include/wx/msw/listbox.h | 11 +- include/wx/msw/listctrl.h | 21 +-- include/wx/msw/mdi.h | 10 +- include/wx/msw/menu.h | 14 +- include/wx/msw/metafile.h | 10 +- include/wx/msw/minifram.h | 10 +- include/wx/msw/msgdlg.h | 10 +- include/wx/msw/ole/dataobj.h | 8 +- include/wx/msw/ole/dropsrc.h | 8 +- include/wx/msw/ole/droptgt.h | 8 +- include/wx/msw/ole/oleutils.h | 8 +- include/wx/msw/ole/uuid.h | 8 +- include/wx/msw/palette.h | 10 +- include/wx/msw/pen.h | 10 +- include/wx/msw/pnghand.h | 2 +- include/wx/msw/pngread.h | 4 +- include/wx/msw/printdlg.h | 10 +- include/wx/msw/printwin.h | 10 +- include/wx/msw/private.h | 10 +- include/wx/msw/radiobox.h | 10 +- include/wx/msw/radiobut.h | 10 +- include/wx/msw/regconf.h | 2 +- include/wx/msw/region.h | 10 +- include/wx/msw/registry.h | 2 +- include/wx/msw/scrolbar.h | 10 +- include/wx/msw/settings.h | 10 +- include/wx/msw/setup.h | 12 +- include/wx/msw/slider.h | 4 +- include/wx/msw/slider95.h | 4 +- include/wx/msw/slidrmsw.h | 4 +- include/wx/msw/spinbutt.h | 12 +- include/wx/msw/statbmp.h | 10 +- include/wx/msw/statbox.h | 10 +- include/wx/msw/statbr95.h | 2 +- include/wx/msw/stattext.h | 10 +- include/wx/msw/tabctrl.h | 10 +- include/wx/msw/tbar95.h | 10 +- include/wx/msw/tbarmsw.h | 10 +- include/wx/msw/textctrl.h | 10 +- include/wx/msw/timer.h | 10 +- include/wx/msw/treectrl.h | 22 ++- include/wx/msw/wave.h | 8 +- include/wx/msw/window.h | 35 +---- src/common/resource.cpp | 9 ++ src/msw/app.cpp | 5 + src/msw/choice.cpp | 16 +- src/msw/colordlg.cpp | 20 +-- src/msw/combobox.cpp | 2 +- src/msw/dialog.cpp | 2 +- src/msw/fontdlg.cpp | 32 ++-- src/msw/listctrl.cpp | 61 ++++++-- src/msw/mdi.cpp | 2 +- src/msw/minifram.cpp | 2 +- src/msw/treectrl.cpp | 52 +++++-- src/msw/window.cpp | 2 +- utils/dialoged/src/makefile.b32 | 2 +- utils/dialoged/src/makefile.g95 | 8 +- utils/dialoged/src/makefile.nt | 7 +- utils/dialoged/src/reseditr.cpp | 117 +++++++++++++-- utils/dialoged/src/reseditr.h | 22 ++- utils/dialoged/src/reswrite.cpp | 252 ++++++-------------------------- utils/dialoged/src/symbtabl.cpp | 7 + utils/dialoged/src/winprop.cpp | 168 ++++++++++++++------- utils/dialoged/src/winprop.h | 13 +- utils/ogl/distrib/zipogl.bat | 16 +- utils/wxprop/src/proplist.cpp | 57 ++++++-- utils/wxprop/src/proplist.h | 14 +- 110 files changed, 1013 insertions(+), 837 deletions(-) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index ca6ef6df3a..a1f1bba8d5 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -9,6 +9,9 @@ docs/todo.txt docs/licence.txt docs/symbols.txt +src/*.inc +src/mkdir + src/common/*.cpp src/common/dosyacc.c src/common/doslex.c @@ -205,22 +208,22 @@ utils/dialoged/test/*.bmp samples/*.txt samples/makefile.* -samples/hello/*.cpp -samples/hello/*.h -samples/hello/*.def -samples/hello/makefile.* -samples/hello/*.xbm -samples/hello/*.xpm -samples/hello/*.txt -samples/hello/*.ico -samples/hello/*.bmp -samples/hello/*.rc -samples/hello/*.wav +samples/config/*.cpp +samples/config/*.h +samples/config/*.def +samples/config/makefile*.* +samples/config/*.xbm +samples/config/*.xpm +samples/config/*.txt +samples/config/*.ico +samples/config/*.bmp +samples/config/*.rc +samples/config/*.wav samples/dynamic/*.cpp samples/dynamic/*.h samples/dynamic/*.def -samples/dynamic/makefile.* +samples/dynamic/makefile*.* samples/dynamic/*.xbm samples/dynamic/*.xpm samples/dynamic/*.txt @@ -232,7 +235,7 @@ samples/dynamic/*.wav samples/bombs/*.cpp samples/bombs/*.h samples/bombs/*.def -samples/bombs/makefile.* +samples/bombs/makefile*.* samples/bombs/*.xbm samples/bombs/*.xpm samples/bombs/*.txt @@ -243,7 +246,7 @@ samples/bombs/*.rc samples/ipc/*.cpp samples/ipc/*.h samples/ipc/*.def -samples/ipc/makefile.* +samples/ipc/makefile*.* samples/ipc/*.xbm samples/ipc/*.xpm samples/ipc/*.ico @@ -254,7 +257,7 @@ samples/types/*.h samples/types/*.def samples/types/*.rc samples/types/*.txt -samples/types/makefile.* +samples/types/makefile*.* samples/types/*.xbm samples/types/*.xpm samples/types/*.ico @@ -265,7 +268,7 @@ samples/resource/*.def samples/resource/*.rc samples/resource/*.txt samples/resource/*.wxr -samples/resource/makefile.* +samples/resource/makefile*.* samples/resource/*.xbm samples/resource/*.xpm samples/resource/*.ico @@ -273,7 +276,7 @@ samples/resource/*.ico samples/animate/*.cpp samples/animate/*.h samples/animate/*.def -samples/animate/makefile.* +samples/animate/makefile*.* samples/animate/*.xbm samples/animate/*.xpm samples/animate/*.ico @@ -282,7 +285,7 @@ samples/animate/*.rc samples/mdi/*.cpp samples/mdi/*.h samples/mdi/*.def -samples/mdi/makefile.* +samples/mdi/makefile*.* samples/mdi/*.xbm samples/mdi/*.xpm samples/mdi/*.ico @@ -293,7 +296,7 @@ samples/mdi/bitmaps/*.ico samples/minimal/*.cpp samples/minimal/*.h samples/minimal/*.def -samples/minimal/makefile.* +samples/minimal/makefile*.* samples/minimal/*.xbm samples/minimal/*.xpm samples/minimal/*.ico @@ -302,7 +305,7 @@ samples/minimal/*.rc samples/controls/*.cpp samples/controls/*.h samples/controls/*.def -samples/controls/makefile.* +samples/controls/makefile*.* samples/controls/*.xbm samples/controls/*.xpm samples/controls/*.ico @@ -312,7 +315,7 @@ samples/controls/*.rc samples/fractal/*.cpp samples/fractal/*.h samples/fractal/*.def -samples/fractal/makefile.* +samples/fractal/makefile*.* samples/fractal/*.xbm samples/fractal/*.xpm samples/fractal/*.ico @@ -321,7 +324,7 @@ samples/fractal/*.rc samples/layout/*.cpp samples/layout/*.h samples/layout/*.def -samples/layout/makefile.* +samples/layout/makefile*.* samples/layout/*.xbm samples/layout/*.xpm samples/layout/*.ico @@ -331,7 +334,7 @@ samples/layout/*.bmp samples/printing/*.cpp samples/printing/*.h samples/printing/*.def -samples/printing/makefile.* +samples/printing/makefile*.* samples/printing/*.xbm samples/printing/*.xpm samples/printing/*.txt @@ -343,7 +346,7 @@ samples/printing/*.afm samples/toolbar/*.cpp samples/toolbar/*.h samples/toolbar/*.def -samples/toolbar/makefile.* +samples/toolbar/makefile*.* samples/toolbar/*.txt samples/toolbar/*.xbm samples/toolbar/*.xpm @@ -358,7 +361,7 @@ samples/docview/*.h samples/docview/*.cpp samples/docview/*.def samples/docview/*.rc -samples/docview/makefile.* +samples/docview/makefile*.* samples/docview/*.xbm samples/docview/*.xpm samples/docview/*.txt @@ -369,7 +372,7 @@ samples/memcheck/*.h samples/memcheck/*.cpp samples/memcheck/*.def samples/memcheck/*.rc -samples/memcheck/makefile.* +samples/memcheck/makefile*.* samples/memcheck/*.xbm samples/memcheck/*.xpm samples/memcheck/*.txt @@ -380,7 +383,7 @@ samples/odbc/*.h samples/odbc/*.cpp samples/odbc/*.def samples/odbc/*.rc -samples/odbc/makefile.* +samples/odbc/makefile*.* samples/odbc/*.inf samples/odbc/*.xbm samples/odbc/*.xpm @@ -393,7 +396,7 @@ samples/dialogs/*.h samples/dialogs/*.cpp samples/dialogs/*.def samples/dialogs/*.rc -samples/dialogs/makefile.* +samples/dialogs/makefile*.* samples/dialogs/*.xbm samples/dialogs/*.xpm samples/dialogs/*.txt @@ -406,7 +409,7 @@ samples/wxpoem/*.def samples/wxpoem/*.rc samples/wxpoem/*.inf samples/wxpoem/*.txt -samples/wxpoem/makefile.* +samples/wxpoem/makefile*.* samples/wxpoem/*.xbm samples/wxpoem/*.xpm samples/wxpoem/*.ico @@ -420,7 +423,7 @@ samples/pressup/*.def samples/pressup/*.rc samples/pressup/*.inf samples/pressup/*.txt -samples/pressup/makefile.* +samples/pressup/makefile*.* samples/pressup/*.xbm samples/pressup/*.xpm samples/pressup/*.ico @@ -432,7 +435,7 @@ samples/validate/*.def samples/validate/*.rc samples/validate/*.inf samples/validate/*.txt -samples/validate/makefile.* +samples/validate/makefile*.* samples/validate/*.xbm samples/validate/*.xpm samples/validate/*.ico @@ -444,7 +447,7 @@ samples/events/*.def samples/events/*.rc samples/events/*.inf samples/events/*.txt -samples/events/makefile.* +samples/events/makefile*.* samples/events/*.xbm samples/events/*.xpm samples/events/*.ico @@ -455,7 +458,7 @@ samples/treectrl/*.h samples/treectrl/*.def samples/treectrl/*.rc samples/treectrl/*.txt -samples/treectrl/makefile.* +samples/treectrl/makefile*.* samples/treectrl/*.xbm samples/treectrl/*.xpm samples/treectrl/bitmaps/*.xbm @@ -470,7 +473,7 @@ samples/listctrl/*.h samples/listctrl/*.def samples/listctrl/*.rc samples/listctrl/*.txt -samples/listctrl/makefile.* +samples/listctrl/makefile*.* samples/listctrl/*.xbm samples/listctrl/*.xpm samples/listctrl/bitmaps/*.xbm @@ -485,7 +488,7 @@ samples/splitter/*.h samples/splitter/*.def samples/splitter/*.rc samples/splitter/*.txt -samples/splitter/makefile.* +samples/splitter/makefile*.* samples/splitter/*.xbm samples/splitter/*.xpm samples/splitter/*.ico @@ -496,7 +499,7 @@ samples/grid/*.h samples/grid/*.def samples/grid/*.rc samples/grid/*.txt -samples/grid/makefile.* +samples/grid/makefile*.* samples/grid/*.xbm samples/grid/*.xpm samples/grid/*.ico @@ -507,7 +510,7 @@ samples/internat/*.h samples/internat/*.def samples/internat/*.rc samples/internat/*.txt -samples/internat/makefile.* +samples/internat/makefile*.* samples/internat/*.xbm samples/internat/*.xpm samples/internat/*.po @@ -520,7 +523,7 @@ samples/checklst/*.h samples/checklst/*.def samples/checklst/*.rc samples/checklst/*.txt -samples/checklst/makefile.* +samples/checklst/makefile*.* samples/checklst/*.xbm samples/checklst/*.xpm samples/checklst/*.ico @@ -528,7 +531,7 @@ samples/checklst/*.bmp samples/dnd/*.cpp samples/dnd/*.h -samples/dnd/makefile.* +samples/dnd/makefile*.* samples/dnd/*.rc samples/dnd/*.def samples/dnd/*.bmp @@ -539,7 +542,7 @@ samples/dnd/*.txt samples/tab/*.cpp samples/tab/*.h -samples/tab/makefile.* +samples/tab/makefile*.* samples/tab/*.rc samples/tab/*.def samples/tab/*.bmp @@ -550,7 +553,7 @@ samples/tab/*.txt samples/png/*.cpp samples/png/*.h -samples/png/makefile.* +samples/png/makefile*.* samples/png/*.rc samples/png/*.def samples/png/*.bmp diff --git a/distrib/msw/gtk.rsp b/distrib/msw/gtk.rsp index a0701719f5..f5814f55a5 100644 --- a/distrib/msw/gtk.rsp +++ b/distrib/msw/gtk.rsp @@ -8,6 +8,7 @@ docs/gtk/*.html src/mkdirs src/Makefile src/Makefile.in +src/*.inc src/gtk/*.cpp src/gtk/*.c @@ -28,6 +29,18 @@ src/gdk_imlib/COPYING.LIB src/gdk_imlib/README src/gdk_imlib/ChangeLog +src/iodbc/*.c +src/iodbc/*.ci +src/iodbc/*.h +src/iodbc/IAFA-PACKAGE +src/iodbc/README +src/iodbc/*.exp +src/iodbc/*.mk +src/iodbc/autoconfig +src/iodbc/build +src/iodbc/Changes.log +src/iodbc/postgres/*.h + install/gtk/* misc/afm/* diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat index 74237fe03d..fa765e1b4a 100755 --- a/distrib/msw/zipdist.bat +++ b/distrib/msw/zipdist.bat @@ -1,27 +1,29 @@ @echo off rem Zip up an external, generic + Windows distribution of wxWindows 2.0 -if "%1" == "" goto usage -if "%2" == "" goto usage +set src=d:\wx2\wxWindows +set dest=%src\deliver +if "%src" == "" goto usage +if "%dest" == "" goto usage echo About to archive an external wxWindows distribution: -echo From %1 -echo To %2\wx200gen.zip, %2\wx200doc.zip, %2\wx200msw.zip, %2\wx200ps.zip, %2\wx200hlp.zip, %2\wx200htm.zip, %2\wx200pdf.zip +echo From %src +echo To %dest\wx200gen.zip, %dest\wx200doc.zip, %dest\wx200msw.zip, %dest\wx200ps.zip, %dest\wx200hlp.zip, %dest\wx200htm.zip, %dest\wx200pdf.zip echo CTRL-C if this is not correct. pause -erase %2\wx200*.zip +erase %dest\wx200*.zip -cd %1 +cd %src echo Zipping... -zip32 -@ %2\wx200gen.zip < %1\distrib\msw\generic.rsp -zip32 -@ %2\wx200msw.zip < %1\distrib\msw\msw.rsp -zip32 -@ %2\wx200gtk.zip < %1\distrib\msw\gtk.rsp -zip32 -@ %2\wx200doc.zip < %1\distrib\msw\docsrc.rsp +zip32 -@ %dest\wx200gen.zip < %src\distrib\msw\generic.rsp +zip32 -@ %dest\wx200msw.zip < %src\distrib\msw\msw.rsp +zip32 -@ %dest\wx200gtk.zip < %src\distrib\msw\gtk.rsp +zip32 -@ %dest\wx200doc.zip < %src\distrib\msw\docsrc.rsp -zip32 -@ %2\wx200hlp.zip < %1\distrib\msw\wx_hlp.rsp -zip32 -@ %2\wx200htm.zip < %1\distrib\msw\wx_html.rsp -zip32 -@ %2\wx200pdf.zip < %1\distrib\msw\wx_pdf.rsp +zip32 -@ %dest\wx200hlp.zip < %src\distrib\msw\wx_hlp.rsp +zip32 -@ %dest\wx200htm.zip < %src\distrib\msw\wx_html.rsp +zip32 -@ %dest\wx200pdf.zip < %src\distrib\msw\wx_pdf.rsp -cd %2 +cd %dest echo wxWindows archived. goto end diff --git a/docs/latex/wx/dialog.tex b/docs/latex/wx/dialog.tex index c65b41d41c..95d758c852 100644 --- a/docs/latex/wx/dialog.tex +++ b/docs/latex/wx/dialog.tex @@ -30,8 +30,9 @@ dialog to respond to system close events. \twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box (Motif only).} \twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION, wxSYSTEM\_MENU and wxTHICK\_FRAME} \twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window (Motif only).} -\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu (Motif only).} -\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window (Motif only).} +\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu.} +\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window.} +\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{The dialog stays on top of all other windows (Windows only).} \twocolitem{\windowstyle{wxNO\_3D}}{Under Windows, specifies that the child controls should not have 3D borders unless specified in the control.} \end{twocollist} diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index fa68e77a32..2c2ac8ac38 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -111,12 +111,35 @@ Deletes all the items in the control. Deletes the specified item. -\membersection{wxTreeCtrl::Edit}\label{wxtreectrledit} +\membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel} -\func{wxTextCtrl\&}{Edit}{\param{long }{item}} +\func{wxTextCtrl*}{EditLabel}{\param{long }{item}, \param{wxClassInfo*}{ textControlClass = CLASSINFO(wxTextCtrl)}} Starts editing the label of the given item, returning the text control that the tree control uses for editing. +Pass another {\it textControlClass} if a derived class is required. It usually will be, in order for +the application to detect when editing has finished and to call \helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel}. + +Do not delete the text control yourself. + +This function is currently supported under Windows only. + +\wxheading{See also} + +\helpref{wxTreeCtrl::EndEditLabel}{wxtreectrlendeditlabel} + +\membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel} + +\func{bool}{EndEditLabel}{\param{bool }{cancelEdit}} + +Ends label editing. If {\it cancelEdit} is TRUE, the edit will be cancelled. + +This function is currently supported under Windows only. + +\wxheading{See also} + +\helpref{wxTreeCtrl::EditLabel}{wxtreectrleditlabel} + \membersection{wxTreeCtrl::EnsureVisible}\label{wxtreectrlensurevisible} \func{bool}{EnsureVisible}{\param{long }{item}} diff --git a/include/wx/msw/app.h b/include/wx/msw/app.h index 54b58a4ee9..0889410bf6 100644 --- a/include/wx/msw/app.h +++ b/include/wx/msw/app.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __APPH__ -#define __APPH__ +#ifndef _WX_APP_H_ +#define _WX_APP_H_ #ifdef __GNUG__ #pragma interface "app.h" @@ -162,5 +162,5 @@ int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance); #endif #endif - // __APPH__ + // _WX_APP_H_ diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index cbe8b012fc..a8c9c2507b 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __BITMAPH__ -#define __BITMAPH__ +#ifndef _WX_BITMAP_H_ +#define _WX_BITMAP_H_ #ifdef __GNUG__ #pragma interface "bitmap.h" @@ -199,4 +199,4 @@ public: }; #endif - // __BITMAPH__ + // _WX_BITMAP_H_ diff --git a/include/wx/msw/bmpbuttn.h b/include/wx/msw/bmpbuttn.h index 118888a4e9..956c9128f9 100644 --- a/include/wx/msw/bmpbuttn.h +++ b/include/wx/msw/bmpbuttn.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __BMPBUTTNH__ -#define __BMPBUTTNH__ +#ifndef _WX_BMPBUTTN_H_ +#define _WX_BMPBUTTN_H_ #ifdef __GNUG__ #pragma interface "bmpbuttn.h" @@ -82,4 +82,4 @@ class WXDLLEXPORT wxBitmapButton: public wxButton }; #endif - // __BMPBUTTNH__ + // _WX_BMPBUTTN_H_ diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 59fce013ad..71367662a4 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __BRUSHH__ -#define __BRUSHH__ +#ifndef _WX_BRUSH_H_ +#define _WX_BRUSH_H_ #ifdef __GNUG__ #pragma interface "brush.h" @@ -81,4 +81,4 @@ public: }; #endif - // __BRUSHH__ + // _WX_BRUSH_H_ diff --git a/include/wx/msw/button.h b/include/wx/msw/button.h index d4755612fa..34e0824d6d 100644 --- a/include/wx/msw/button.h +++ b/include/wx/msw/button.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __BUTTONH__ -#define __BUTTONH__ +#ifndef _WX_BUTTON_H_ +#define _WX_BUTTON_H_ #ifdef __GNUG__ #pragma interface "button.h" @@ -53,4 +53,4 @@ class WXDLLEXPORT wxButton: public wxControl }; #endif - // __BUTTONH__ + // _WX_BUTTON_H_ diff --git a/include/wx/msw/checkbox.h b/include/wx/msw/checkbox.h index 553224d02c..e5ddc460f6 100644 --- a/include/wx/msw/checkbox.h +++ b/include/wx/msw/checkbox.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __CHECKBOXH__ -#define __CHECKBOXH__ +#ifndef _WX_CHECKBOX_H_ +#define _WX_CHECKBOX_H_ #ifdef __GNUG__ #pragma interface "checkbox.h" @@ -81,4 +81,4 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox virtual void SetLabel(const wxBitmap *bitmap); }; #endif - // __CHECKBOXH__ + // _WX_CHECKBOX_H_ diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index 51bd9f0a77..f511a98087 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -6,11 +6,11 @@ // Created: 16.11.97 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifndef __CHECKLST_H__ -#define __CHECKLST_H__ +#ifndef __CHECKLST__H_ +#define __CHECKLST__H_ #ifdef __GNUG__ #pragma interface "checklst.h" diff --git a/include/wx/msw/choice.h b/include/wx/msw/choice.h index a70061a06f..e3fd471b6d 100644 --- a/include/wx/msw/choice.h +++ b/include/wx/msw/choice.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __CHOICEH__ -#define __CHOICEH__ +#ifndef _WX_CHOICE_H_ +#define _WX_CHOICE_H_ #ifdef __GNUG__ #pragma interface "choice.h" @@ -26,9 +26,7 @@ class WXDLLEXPORT wxChoice: public wxControl DECLARE_DYNAMIC_CLASS(wxChoice) public: - int no_strings; - - inline wxChoice(void) { no_strings = 0; } + inline wxChoice(void) { m_noStrings = 0; } inline wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -60,7 +58,7 @@ class WXDLLEXPORT wxChoice: public wxControl virtual wxString GetStringSelection(void) const ; virtual bool SetStringSelection(const wxString& sel); - virtual inline int Number(void) const { return no_strings; } + virtual inline int Number(void) const { return m_noStrings; } virtual void Command(wxCommandEvent& event); virtual bool MSWCommand(WXUINT param, WXWORD id); @@ -72,7 +70,11 @@ class WXDLLEXPORT wxChoice: public wxControl WXUINT message, WXWPARAM wParam, WXLPARAM lParam); long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + +protected: + int m_noStrings; + }; #endif - // __CHOICEH__ + // _WX_CHOICE_H_ diff --git a/include/wx/msw/clipbrd.h b/include/wx/msw/clipbrd.h index abdabfb142..8d4d4edfb2 100644 --- a/include/wx/msw/clipbrd.h +++ b/include/wx/msw/clipbrd.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __CLIPBRDH__ -#define __CLIPBRDH__ +#ifndef _WX_CLIPBRD_H_ +#define _WX_CLIPBRD_H_ #ifdef __GNUG__ #pragma interface "clipbrd.h" @@ -108,4 +108,4 @@ extern wxClipboard* WXDLLEXPORT wxTheClipboard; #endif // USE_CLIPBOARD #endif - // __CLIPBRDH__ + // _WX_CLIPBRD_H_ diff --git a/include/wx/msw/colordlg.h b/include/wx/msw/colordlg.h index 09cd225e90..5643ef6f2f 100644 --- a/include/wx/msw/colordlg.h +++ b/include/wx/msw/colordlg.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __COLORDLGH__ -#define __COLORDLGH__ +#ifndef _WX_COLORDLG_H_ +#define _WX_COLORDLG_H_ #ifdef __GNUG__ #pragma interface "colordlg.h" @@ -26,19 +26,20 @@ class WXDLLEXPORT wxColourDialog: public wxDialog { - DECLARE_DYNAMIC_CLASS(wxColourDialog) - protected: - wxColourData colourData; - wxWindow *dialogParent; - public: - wxColourDialog(void); - wxColourDialog(wxWindow *parent, wxColourData *data = NULL); - - bool Create(wxWindow *parent, wxColourData *data = NULL); - - int ShowModal(void); - wxColourData& GetColourData(void) { return colourData; } +DECLARE_DYNAMIC_CLASS(wxColourDialog) +public: + wxColourDialog(void); + wxColourDialog(wxWindow *parent, wxColourData *data = NULL); + + bool Create(wxWindow *parent, wxColourData *data = NULL); + + int ShowModal(void); + wxColourData& GetColourData(void) { return m_colourData; } + +protected: + wxColourData m_colourData; + wxWindow* m_dialogParent; }; #endif - // __COLORDLGH__ + // _WX_COLORDLG_H_ diff --git a/include/wx/msw/colour.h b/include/wx/msw/colour.h index c4632bde4d..9e001f03e7 100644 --- a/include/wx/msw/colour.h +++ b/include/wx/msw/colour.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __COLOURH__ -#define __COLOURH__ +#ifndef _WX_COLOUR_H_ +#define _WX_COLOUR_H_ #ifdef __GNUG__ #pragma interface "colour.h" @@ -68,4 +68,4 @@ public: #define wxColor wxColour #endif - // __COLOURH__ + // _WX_COLOUR_H_ diff --git a/include/wx/msw/combobox.h b/include/wx/msw/combobox.h index fdebc76c48..0739774280 100644 --- a/include/wx/msw/combobox.h +++ b/include/wx/msw/combobox.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __COMBOBOXH__ -#define __COMBOBOXH__ +#ifndef _WX_COMBOBOX_H_ +#define _WX_COMBOBOX_H_ #ifdef __GNUG__ #pragma interface "combobox.h" @@ -80,4 +80,4 @@ class WXDLLEXPORT wxComboBox: public wxChoice #endif // USE_COMBOBOX #endif - // __COMBOBOXH__ + // _WX_COMBOBOX_H_ diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h index 0d9f09d682..495799bf32 100644 --- a/include/wx/msw/control.h +++ b/include/wx/msw/control.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __CONTROLH__ -#define __CONTROLH__ +#ifndef _WX_CONTROL_H_ +#define _WX_CONTROL_H_ #ifdef __GNUG__ #pragma interface "control.h" @@ -83,4 +83,4 @@ inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); } #endif #endif - // __CONTROLH__ + // _WX_CONTROL_H_ diff --git a/include/wx/msw/curico.h b/include/wx/msw/curico.h index 0ea5f02cf6..b85a39b194 100644 --- a/include/wx/msw/curico.h +++ b/include/wx/msw/curico.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// HICON ReadIconFile( char *szFileName, HINSTANCE hInst, diff --git a/include/wx/msw/cursor.h b/include/wx/msw/cursor.h index 41d34c3ba7..f72d922d05 100644 --- a/include/wx/msw/cursor.h +++ b/include/wx/msw/cursor.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __CURSORH__ -#define __CURSORH__ +#ifndef _WX_CURSOR_H_ +#define _WX_CURSOR_H_ #ifdef __GNUG__ #pragma interface "cursor.h" @@ -66,4 +66,4 @@ public: }; #endif - // __CURSORH__ + // _WX_CURSOR_H_ diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index 1b4c0457a2..8d90a1797b 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DCH__ -#define __DCH__ +#ifndef _WX_DC_H_ +#define _WX_DC_H_ #ifdef __GNUG__ #pragma interface "dc.h" @@ -412,4 +412,4 @@ extern int wxPageNumber; #endif - // __DCH__ + // _WX_DC_H_ diff --git a/include/wx/msw/dcclient.h b/include/wx/msw/dcclient.h index 9851d78d77..126eb39076 100644 --- a/include/wx/msw/dcclient.h +++ b/include/wx/msw/dcclient.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __DCCLIENTH__ -#define __DCCLIENTH__ +#ifndef _WX_DCCLIENT_H_ +#define _WX_DCCLIENT_H_ #ifdef __GNUG__ #pragma interface "dcclient.h" @@ -62,4 +62,4 @@ class WXDLLEXPORT wxPaintDC: public wxDC }; #endif - // __DCCLIENTH__ + // _WX_DCCLIENT_H_ diff --git a/include/wx/msw/dcmemory.h b/include/wx/msw/dcmemory.h index 7039c610c1..f278bc447e 100644 --- a/include/wx/msw/dcmemory.h +++ b/include/wx/msw/dcmemory.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DCMEMORYH__ -#define __DCMEMORYH__ +#ifndef _WX_DCMEMORY_H_ +#define _WX_DCMEMORY_H_ #ifdef __GNUG__ #pragma interface "dcmemory.h" @@ -32,4 +32,4 @@ class WXDLLEXPORT wxMemoryDC: public wxDC }; #endif - // __DCMEMORYH__ + // _WX_DCMEMORY_H_ diff --git a/include/wx/msw/dcprint.h b/include/wx/msw/dcprint.h index 5a34cd0bb5..8ad3c3574b 100644 --- a/include/wx/msw/dcprint.h +++ b/include/wx/msw/dcprint.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DCPRINTH__ -#define __DCPRINTH__ +#ifndef _WX_DCPRINT_H_ +#define _WX_DCPRINT_H_ #ifdef __GNUG__ #pragma interface "dcprint.h" @@ -34,5 +34,5 @@ class WXDLLEXPORT wxPrinterDC: public wxDC WXHDC WXDLLEXPORT wxGetPrinterDC(int orientation); #endif - // __DCPRINTH__ + // _WX_DCPRINT_H_ diff --git a/include/wx/msw/dcscreen.h b/include/wx/msw/dcscreen.h index 09d1ac51d0..6a64c9e934 100644 --- a/include/wx/msw/dcscreen.h +++ b/include/wx/msw/dcscreen.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DCSCREENH__ -#define __DCSCREENH__ +#ifndef _WX_DCSCREEN_H_ +#define _WX_DCSCREEN_H_ #ifdef __GNUG__ #pragma interface "dcscreen.h" @@ -35,5 +35,5 @@ class WXDLLEXPORT wxScreenDC: public wxDC }; #endif - // __DCSCREENH__ + // _WX_DCSCREEN_H_ diff --git a/include/wx/msw/dde.h b/include/wx/msw/dde.h index 31aaa334a8..183c55243c 100644 --- a/include/wx/msw/dde.h +++ b/include/wx/msw/dde.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DDEH__ -#define __DDEH__ +#ifndef _WX_DDE_H_ +#define _WX_DDE_H_ #ifdef __GNUG__ #pragma interface "dde.h" @@ -159,4 +159,4 @@ void WXDLLEXPORT wxDDECleanUp(); #endif #endif - // __DDEH__ + // _WX_DDE_H_ diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index 99dec3f0ef..d4a19e94e8 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOGH__ -#define __DIALOGH__ +#ifndef _WX_DIALOG_H_ +#define _WX_DIALOG_H_ #ifdef __GNUG__ #pragma interface "dialog.h" @@ -118,4 +118,4 @@ DECLARE_EVENT_TABLE() }; #endif - // __DIALOGH__ + // _WX_DIALOG_H_ diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h index 754651fb83..885663d0a8 100644 --- a/include/wx/msw/dib.h +++ b/include/wx/msw/dib.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // Save (device dependent) wxBitmap as a DIB diff --git a/include/wx/msw/dibutils.h b/include/wx/msw/dibutils.h index b43d4fab2f..746660d688 100644 --- a/include/wx/msw/dibutils.h +++ b/include/wx/msw/dibutils.h @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Microsoft, Julian Smart -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /*************************************************************************** diff --git a/include/wx/msw/dirdlg.h b/include/wx/msw/dirdlg.h index bbe29b3de5..7f3a8dd5f9 100644 --- a/include/wx/msw/dirdlg.h +++ b/include/wx/msw/dirdlg.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __DIRDLGH__ -#define __DIRDLGH__ +#ifndef _WX_DIRDLG_H_ +#define _WX_DIRDLG_H_ #ifdef __GNUG__ #pragma interface "dirdlg.h" @@ -44,4 +44,4 @@ protected: }; #endif - // __DIRDLGH__ + // _WX_DIRDLG_H_ diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h index 219d0b5c8e..356dc8ea03 100644 --- a/include/wx/msw/filedlg.h +++ b/include/wx/msw/filedlg.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __FILEDLGH__ -#define __FILEDLGH__ +#ifndef _WX_FILEDLG_H_ +#define _WX_FILEDLG_H_ #ifdef __GNUG__ #pragma interface "filedlg.h" @@ -86,4 +86,4 @@ char* WXDLLEXPORT wxLoadFileSelector(const char *what, const char *extension, co char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL); #endif - // __FILEDLGH__ + // _WX_FILEDLG_H_ diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index 5c1f7dc6b0..2ce96b9bd9 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __FONTH__ -#define __FONTH__ +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ #ifdef __GNUG__ #pragma interface "font.h" @@ -95,4 +95,4 @@ public: }; #endif - // __FONTH__ + // _WX_FONT_H_ diff --git a/include/wx/msw/fontdlg.h b/include/wx/msw/fontdlg.h index 9ef6c77751..43d5d315be 100644 --- a/include/wx/msw/fontdlg.h +++ b/include/wx/msw/fontdlg.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __FONTDLGH__ -#define __FONTDLGH__ +#ifndef _WX_FONTDLG_H_ +#define _WX_FONTDLG_H_ #ifdef __GNUG__ #pragma interface "fontdlg.h" @@ -25,20 +25,22 @@ class WXDLLEXPORT wxFontDialog: public wxDialog { - DECLARE_DYNAMIC_CLASS(wxFontDialog) - protected: - wxWindow *dialogParent; - wxFontData fontData; - public: - wxFontDialog(void); - wxFontDialog(wxWindow *parent, wxFontData *data = NULL); - - bool Create(wxWindow *parent, wxFontData *data = NULL); - - int ShowModal(void); - wxFontData& GetFontData(void) { return fontData; } +DECLARE_DYNAMIC_CLASS(wxFontDialog) + +public: + wxFontDialog(void); + wxFontDialog(wxWindow *parent, wxFontData *data = NULL); + + bool Create(wxWindow *parent, wxFontData *data = NULL); + + int ShowModal(void); + wxFontData& GetFontData(void) { return m_fontData; } + +protected: + wxWindow *m_dialogParent; + wxFontData m_fontData; }; #endif - // __FONTDLGH__ + // _WX_FONTDLG_H_ diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 12fe97a0d1..cb9baa3d64 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __FRAMEH__ -#define __FRAMEH__ +#ifndef _WX_FRAME_H_ +#define _WX_FRAME_H_ #ifdef __GNUG__ #pragma interface "frame.h" @@ -172,4 +172,4 @@ protected: }; #endif - // __FRAMEH__ + // _WX_FRAME_H_ diff --git a/include/wx/msw/gauge.h b/include/wx/msw/gauge.h index d2effc3441..0751cada22 100644 --- a/include/wx/msw/gauge.h +++ b/include/wx/msw/gauge.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GAUGEH__ -#define __GAUGEH__ +#ifndef _WX_GAUGE_H_ +#define _WX_GAUGE_H_ #ifdef __GNUG__ #pragma interface "gauge.h" @@ -27,4 +27,4 @@ #endif #endif - // __GAUGEH__ + // _WX_GAUGE_H_ diff --git a/include/wx/msw/gauge95.h b/include/wx/msw/gauge95.h index c6d79fa6d9..362a758654 100644 --- a/include/wx/msw/gauge95.h +++ b/include/wx/msw/gauge95.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _GAUGE95_H_ diff --git a/include/wx/msw/gaugemsw.h b/include/wx/msw/gaugemsw.h index e643f18f15..c3c5954ff4 100644 --- a/include/wx/msw/gaugemsw.h +++ b/include/wx/msw/gaugemsw.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _GAUGEMSW_H_ diff --git a/include/wx/msw/gdiobj.h b/include/wx/msw/gdiobj.h index 31c3f4ad97..1950d12ffe 100644 --- a/include/wx/msw/gdiobj.h +++ b/include/wx/msw/gdiobj.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GDIOBJH__ -#define __GDIOBJH__ +#ifndef _WX_GDIOBJ_H_ +#define _WX_GDIOBJ_H_ #include "wx/object.h" @@ -64,4 +64,4 @@ protected: }; #endif - // __GDIOBJH__ + // _WX_GDIOBJ_H_ diff --git a/include/wx/msw/helpwin.h b/include/wx/msw/helpwin.h index 4d460f037a..786155231f 100644 --- a/include/wx/msw/helpwin.h +++ b/include/wx/msw/helpwin.h @@ -5,12 +5,12 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __HELPWINH__ -#define __HELPWINH__ +#ifndef _WX_HELPWIN_H_ +#define _WX_HELPWIN_H_ #ifdef __GNUG__ #pragma interface "helpwin.h" @@ -51,4 +51,4 @@ protected: #endif // USE_HELP #endif - // __HELPWINH__ + // _WX_HELPWIN_H_ diff --git a/include/wx/msw/icon.h b/include/wx/msw/icon.h index 0711d68d85..27d7311298 100644 --- a/include/wx/msw/icon.h +++ b/include/wx/msw/icon.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __ICONH__ -#define __ICONH__ +#ifndef _WX_ICON_H_ +#define _WX_ICON_H_ #ifdef __GNUG__ #pragma interface "icon.h" @@ -99,4 +99,4 @@ public: }; #endif - // __ICONH__ + // _WX_ICON_H_ diff --git a/include/wx/msw/imaglist.h b/include/wx/msw/imaglist.h index 51812b097f..153cfd00d1 100644 --- a/include/wx/msw/imaglist.h +++ b/include/wx/msw/imaglist.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __IMAGLISTH__ -#define __IMAGLISTH__ +#ifndef _WX_IMAGLIST_H_ +#define _WX_IMAGLIST_H_ #ifdef __GNUG__ #pragma interface "imaglist.h" @@ -223,4 +223,4 @@ protected: }; #endif - // __IMAGLISTH__ + // _WX_IMAGLIST_H_ diff --git a/include/wx/msw/iniconf.h b/include/wx/msw/iniconf.h index fb26aa5847..c8d2544d65 100644 --- a/include/wx/msw/iniconf.h +++ b/include/wx/msw/iniconf.h @@ -6,7 +6,7 @@ // Created: 27.07.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _INICONF_H diff --git a/include/wx/msw/joystick.h b/include/wx/msw/joystick.h index aa97ff1252..4b15a0245e 100644 --- a/include/wx/msw/joystick.h +++ b/include/wx/msw/joystick.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __JOYSTICKH__ -#define __JOYSTICKH__ +#ifndef _WX_JOYSTICK_H_ +#define _WX_JOYSTICK_H_ #ifdef __GNUG__ #pragma interface "joystick.h" @@ -90,4 +90,4 @@ protected: }; #endif - // __JOYSTICKH__ + // _WX_JOYSTICK_H_ diff --git a/include/wx/msw/listbox.h b/include/wx/msw/listbox.h index ff26cefab5..d8cf809003 100644 --- a/include/wx/msw/listbox.h +++ b/include/wx/msw/listbox.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __LISTBOXH__ -#define __LISTBOXH__ +#ifndef _WX_LISTBOX_H_ +#define _WX_LISTBOX_H_ #ifdef __GNUG__ #pragma interface "listbox.h" @@ -18,7 +18,6 @@ #include "wx/control.h" -WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr; WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr; #if USE_OWNER_DRAWN @@ -134,4 +133,4 @@ class WXDLLEXPORT wxListBox: public wxControl }; #endif - // __LISTBOXH__ + // _WX_LISTBOX_H_ diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index 95f7a89956..9f6693955b 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __LISTCTRLH__ -#define __LISTCTRLH__ +#ifndef _WX_LISTCTRL_H_ +#define _WX_LISTCTRL_H_ #ifdef __GNUG__ #pragma interface "listctrl.h" @@ -225,7 +225,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl int GetCountPerPage(void) const; // Gets the edit control for editing labels. - wxTextCtrl& GetEditControl(void) const; + wxTextCtrl* GetEditControl(void) const; // Gets information about the item bool GetItem(wxListItem& info) const ; @@ -341,8 +341,11 @@ class WXDLLEXPORT wxListCtrl: public wxControl // Clears items, and columns if there are any. void ClearAll(void); - // Edits a label - wxTextCtrl& Edit(long item) ; + // Edit the label + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit + bool EndEditLabel(bool cancel); // Ensures this item is visible bool EnsureVisible(long item) ; @@ -426,7 +429,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl char *AddPool(const wxString& str); protected: - wxTextCtrl m_textCtrl; // The control used for editing a label + wxTextCtrl* m_textCtrl; // The control used for editing a label wxImageList * m_imageListNormal; // The image list for normal icons wxImageList * m_imageListSmall; // The image list for small icons wxImageList * m_imageListState; // The image list state icons (not implemented yet) @@ -473,4 +476,4 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); #define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, #endif - // __LISTCTRLH__ + // _WX_LISTCTRL_H_ diff --git a/include/wx/msw/mdi.h b/include/wx/msw/mdi.h index a07466a196..658aa6c63d 100644 --- a/include/wx/msw/mdi.h +++ b/include/wx/msw/mdi.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __MDIH__ -#define __MDIH__ +#ifndef _WX_MDI_H_ +#define _WX_MDI_H_ #ifdef __GNUG__ #pragma interface "mdi.h" @@ -206,4 +206,4 @@ DECLARE_EVENT_TABLE() }; #endif - // __MDIH__ + // _WX_MDI_H_ diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index 98049103ba..68f3f67d08 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __MENUH__ -#define __MENUH__ +#ifndef _WX_MENU_H_ +#define _WX_MENU_H_ #ifdef __GNUG__ #pragma interface "menu.h" @@ -19,9 +19,9 @@ #include "wx/defs.h" #include "wx/event.h" -class wxMenuItem; -class wxMenuBar; -class wxMenu; +class WXDLLEXPORT wxMenuItem; +class WXDLLEXPORT wxMenuBar; +class WXDLLEXPORT wxMenu; WXDLLEXPORT_DATA(extern const char*) wxEmptyString; @@ -125,7 +125,7 @@ public: // ---------------------------------------------------------------------------- // Menu Bar (a la Windows) // ---------------------------------------------------------------------------- -class wxFrame; +class WXDLLEXPORT wxFrame; class WXDLLEXPORT wxMenuBar: public wxEvtHandler { DECLARE_DYNAMIC_CLASS(wxMenuBar) @@ -177,4 +177,4 @@ public: WXHMENU m_hMenu; }; -#endif // __MENUH__ +#endif // _WX_MENU_H_ diff --git a/include/wx/msw/metafile.h b/include/wx/msw/metafile.h index c4c0665ed7..993e8738fa 100644 --- a/include/wx/msw/metafile.h +++ b/include/wx/msw/metafile.h @@ -5,13 +5,13 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __METAFIILEH__ -#define __METAFIILEH__ +#ifndef _WX_METAFIILE_H_ +#define _WX_METAFIILE_H_ #ifdef __GNUG__ #pragma interface "metafile.h" @@ -101,4 +101,4 @@ bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y #endif // USE_METAFILE #endif - // __METAFIILEH__ + // _WX_METAFIILE_H_ diff --git a/include/wx/msw/minifram.h b/include/wx/msw/minifram.h index 4bd21f182d..1debcd0082 100644 --- a/include/wx/msw/minifram.h +++ b/include/wx/msw/minifram.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __MINIFRAMH__ -#define __MINIFRAMH__ +#ifndef _WX_MINIFRAM_H_ +#define _WX_MINIFRAM_H_ #ifdef __GNUG__ #pragma interface "minifram.h" @@ -43,4 +43,4 @@ protected: }; #endif - // __MINIFRAMH__ + // _WX_MINIFRAM_H_ diff --git a/include/wx/msw/msgdlg.h b/include/wx/msw/msgdlg.h index 27c10ef6e1..51f7d0e39d 100644 --- a/include/wx/msw/msgdlg.h +++ b/include/wx/msw/msgdlg.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __MSGBOXDLGH__ -#define __MSGBOXDLGH__ +#ifndef _WX_MSGBOXDLG_H_ +#define _WX_MSGBOXDLG_H_ #ifdef __GNUG__ #pragma interface "msgdlg.h" @@ -46,4 +46,4 @@ int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxWindow *parent = NULL, int x = -1, int y = -1); #endif - // __MSGBOXDLGH__ + // _WX_MSGBOXDLG_H_ diff --git a/include/wx/msw/ole/dataobj.h b/include/wx/msw/ole/dataobj.h index 23b6141f24..245c4db718 100644 --- a/include/wx/msw/ole/dataobj.h +++ b/include/wx/msw/ole/dataobj.h @@ -6,11 +6,11 @@ // Created: 10.05.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifndef _OLEDATAOBJ_H -#define _OLEDATAOBJ_H +#ifndef _WX_OLEDATAOBJ_H +#define _WX_OLEDATAOBJ_H // ---------------------------------------------------------------------------- // forward declarations @@ -106,4 +106,4 @@ private: // @@@ TODO: wx{Bitmap|Metafile|...}DataObject // ---------------------------------------------------------------------------- -#endif //_OLEDATAOBJ_H +#endif //_WX_OLEDATAOBJ_H diff --git a/include/wx/msw/ole/dropsrc.h b/include/wx/msw/ole/dropsrc.h index 4630de728d..e711c428ca 100644 --- a/include/wx/msw/ole/dropsrc.h +++ b/include/wx/msw/ole/dropsrc.h @@ -6,11 +6,11 @@ // Created: 06.03.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifndef _OLEDROPSRC_H -#define _OLEDROPSRC_H +#ifndef _WX_OLEDROPSRC_H +#define _WX_OLEDROPSRC_H #ifdef __GNUG__ #pragma interface @@ -68,4 +68,4 @@ private: wxIDropSource *m_pIDropSource; // the pointer to COM interface }; -#endif //_OLEDROPSRC_H \ No newline at end of file +#endif //_WX_OLEDROPSRC_H \ No newline at end of file diff --git a/include/wx/msw/ole/droptgt.h b/include/wx/msw/ole/droptgt.h index cd9fbacfa6..cf990ef5a0 100644 --- a/include/wx/msw/ole/droptgt.h +++ b/include/wx/msw/ole/droptgt.h @@ -6,14 +6,14 @@ // Created: 06.03.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ // prolog // ============================================================================ -#ifndef _OLEDROPTGT_H -#define _OLEDROPTGT_H +#ifndef _WX_OLEDROPTGT_H +#define _WX_OLEDROPTGT_H #ifdef __GNUG__ #pragma interface "droptgt.h" @@ -108,4 +108,4 @@ protected: }; // ============================================================================ -#endif //_OLEDROPTGT_H +#endif //_WX_OLEDROPTGT_H diff --git a/include/wx/msw/ole/oleutils.h b/include/wx/msw/ole/oleutils.h index 60336d6444..2335dd5468 100644 --- a/include/wx/msw/ole/oleutils.h +++ b/include/wx/msw/ole/oleutils.h @@ -6,11 +6,11 @@ // Created: 19.02.1998 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifndef _OLEUTILS_H -#define _OLEUTILS_H +#ifndef _WX_OLEUTILS_H +#define _WX_OLEUTILS_H #ifdef __GNUG__ #pragma interface "oleutils.h" @@ -143,4 +143,4 @@ void wxLogRelease(const char *szInterface, ULONG cRef); #define wxLogRelease(szInterface, cRef) #endif //WXDEBUG -#endif //_OLEUTILS_H \ No newline at end of file +#endif //_WX_OLEUTILS_H \ No newline at end of file diff --git a/include/wx/msw/ole/uuid.h b/include/wx/msw/ole/uuid.h index 211ce71f5e..4da624b09e 100644 --- a/include/wx/msw/ole/uuid.h +++ b/include/wx/msw/ole/uuid.h @@ -6,13 +6,13 @@ // Created: 11.07.97 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence // // Notes: you should link your project with RPCRT4.LIB! /////////////////////////////////////////////////////////////////////////////// -#ifndef _OLEUUID_H -#define _OLEUUID_H +#ifndef _WX_OLEUUID_H +#define _WX_OLEUUID_H #ifdef __GNUG__ #pragma interface "uuid.h" @@ -88,4 +88,4 @@ public: const char *CForm() const { return m_pszCForm; } }; -#endif //_OLEUUID_H \ No newline at end of file +#endif //_WX_OLEUUID_H \ No newline at end of file diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h index f7dffc57b0..510882fa18 100644 --- a/include/wx/msw/palette.h +++ b/include/wx/msw/palette.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PALETTEH__ -#define __PALETTEH__ +#ifndef _WX_PALETTE_H_ +#define _WX_PALETTE_H_ #ifdef __GNUG__ #pragma interface "palette.h" @@ -63,4 +63,4 @@ public: #define wxColourMap wxPalette #endif - // __PALETTEH__ + // _WX_PALETTE_H_ diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 7f2b8491ab..5bf73b0205 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PENH__ -#define __PENH__ +#ifndef _WX_PEN_H_ +#define _WX_PEN_H_ #ifdef __GNUG__ #pragma interface "pen.h" @@ -95,4 +95,4 @@ public: int wx2msPenStyle(int wx_style); #endif - // __PENH__ + // _WX_PEN_H_ diff --git a/include/wx/msw/pnghand.h b/include/wx/msw/pnghand.h index 2b588b35ff..3fb34992fe 100644 --- a/include/wx/msw/pnghand.h +++ b/include/wx/msw/pnghand.h @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Microsoft, Julian Smart -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ diff --git a/include/wx/msw/pngread.h b/include/wx/msw/pngread.h index ed6cc8fa78..637904521a 100644 --- a/include/wx/msw/pngread.h +++ b/include/wx/msw/pngread.h @@ -8,8 +8,8 @@ * */ -#ifndef __PNGREAD__ -#define __PNGREAD__ +#ifndef _WX_PNGREAD__ +#define _WX_PNGREAD__ #ifdef __GNUG__ #pragma interface "pngread.h" diff --git a/include/wx/msw/printdlg.h b/include/wx/msw/printdlg.h index ba5af57c5e..cf14ef75b0 100644 --- a/include/wx/msw/printdlg.h +++ b/include/wx/msw/printdlg.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PRINTDLGH__ -#define __PRINTDLGH__ +#ifndef _WX_PRINTDLG_H_ +#define _WX_PRINTDLG_H_ #ifdef __GNUG__ #pragma interface "printdlg.h" @@ -68,4 +68,4 @@ class WXDLLEXPORT wxPageSetupDialog: public wxDialog }; #endif - // __PRINTDLGH__ + // _WX_PRINTDLG_H_ diff --git a/include/wx/msw/printwin.h b/include/wx/msw/printwin.h index 6ba0aa6a72..075c34b472 100644 --- a/include/wx/msw/printwin.h +++ b/include/wx/msw/printwin.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PRINTWINH__ -#define __PRINTWINH__ +#ifndef _WX_PRINTWIN_H_ +#define _WX_PRINTWIN_H_ #ifdef __GNUG__ #pragma interface "printwin.h" @@ -55,4 +55,4 @@ class WXDLLEXPORT wxWindowsPrintPreview: public wxPrintPreviewBase }; #endif - // __PRINTWINH__ + // _WX_PRINTWIN_H_ diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 6fb4b4af7f..c764c5641f 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __PRIVATEH__ -#define __PRIVATEH__ +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ #include "wx/defs.h" @@ -152,4 +152,4 @@ void WXDLLEXPORT wxAddControlHandle(WXHWND hWnd, wxWindow *item); #endif #endif - // __PRIVATEH__ + // _WX_PRIVATE_H_ diff --git a/include/wx/msw/radiobox.h b/include/wx/msw/radiobox.h index 5cb2077a64..e0dde6b58b 100644 --- a/include/wx/msw/radiobox.h +++ b/include/wx/msw/radiobox.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __RADIOBOXH__ -#define __RADIOBOXH__ +#ifndef _WX_RADIOBOX_H_ +#define _WX_RADIOBOX_H_ #ifdef __GNUG__ #pragma interface "radiobox.h" @@ -134,4 +134,4 @@ protected: }; #endif - // __RADIOBOXH__ + // _WX_RADIOBOX_H_ diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index 8307f8b1f2..a2514e7574 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __RADIOBUTH__ -#define __RADIOBUTH__ +#ifndef _WX_RADIOBUT_H_ +#define _WX_RADIOBUT_H_ #ifdef __GNUG__ #pragma interface "radiobut.h" @@ -89,4 +89,4 @@ class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton #endif #endif - // __RADIOBUTH__ + // _WX_RADIOBUT_H_ diff --git a/include/wx/msw/regconf.h b/include/wx/msw/regconf.h index 67ff6f4700..5f74de0751 100644 --- a/include/wx/msw/regconf.h +++ b/include/wx/msw/regconf.h @@ -6,7 +6,7 @@ // Created: 27.04.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _REGCONF_H diff --git a/include/wx/msw/region.h b/include/wx/msw/region.h index f0c9cfbcb2..0ac45586ec 100644 --- a/include/wx/msw/region.h +++ b/include/wx/msw/region.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __REGIONH__ -#define __REGIONH__ +#ifndef _WX_REGION_H_ +#define _WX_REGION_H_ #ifdef __GNUG__ #pragma interface "region.h" @@ -134,4 +134,4 @@ private: }; #endif - // __REGIONH__ + // _WX_REGION_H_ diff --git a/include/wx/msw/registry.h b/include/wx/msw/registry.h index e63bffb607..1d831982c5 100644 --- a/include/wx/msw/registry.h +++ b/include/wx/msw/registry.h @@ -6,7 +6,7 @@ // Created: 03.04.198 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _REGISTRY_H diff --git a/include/wx/msw/scrolbar.h b/include/wx/msw/scrolbar.h index 2ef6b9a55c..cf461ecd59 100644 --- a/include/wx/msw/scrolbar.h +++ b/include/wx/msw/scrolbar.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __SCROLBARH__ -#define __SCROLBARH__ +#ifndef _WX_SCROLBAR_H_ +#define _WX_SCROLBAR_H_ #ifdef __GNUG__ #pragma interface "scrolbar.h" @@ -88,4 +88,4 @@ DECLARE_EVENT_TABLE() }; #endif - // __SCROLBARH__ + // _WX_SCROLBAR_H_ diff --git a/include/wx/msw/settings.h b/include/wx/msw/settings.h index 08f1e64e8e..2df189e9ae 100644 --- a/include/wx/msw/settings.h +++ b/include/wx/msw/settings.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __SETTINGSH__ -#define __SETTINGSH__ +#ifndef _WX_SETTINGS_H_ +#define _WX_SETTINGS_H_ #ifdef __GNUG__ #pragma interface "settings.h" @@ -126,4 +126,4 @@ public: }; #endif - // __SETTINGSH__ + // _WX_SETTINGS_H_ diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index 2d472aed34..85ff39009b 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __SETUPH__ -#define __SETUPH__ +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ /* * General features @@ -19,7 +19,7 @@ #define USE_CONFIG 1 // Use wxConfig, with CreateConfig in wxApp -#define __GOODCOMPILER__ +#define _WX_GOODCOMPILER__ // gcc can have problems, but Windows compilers // are generally OK. #define WXWIN_COMPATIBILITY 1 @@ -328,4 +328,4 @@ #endif #endif - // __SETUPH__ + // _WX_SETUP_H_ diff --git a/include/wx/msw/slider.h b/include/wx/msw/slider.h index 3ac84b5342..07ae358658 100644 --- a/include/wx/msw/slider.h +++ b/include/wx/msw/slider.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _SLIDER_H_ diff --git a/include/wx/msw/slider95.h b/include/wx/msw/slider95.h index 445d8f3da5..ed8c6523c3 100644 --- a/include/wx/msw/slider95.h +++ b/include/wx/msw/slider95.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _SLIDER95_H_ diff --git a/include/wx/msw/slidrmsw.h b/include/wx/msw/slidrmsw.h index afeebafcfb..8384086d1e 100644 --- a/include/wx/msw/slidrmsw.h +++ b/include/wx/msw/slidrmsw.h @@ -5,8 +5,8 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _SLIDRMSW_H_ diff --git a/include/wx/msw/spinbutt.h b/include/wx/msw/spinbutt.h index 4c1aa7b1c9..31e2b9dbf0 100644 --- a/include/wx/msw/spinbutt.h +++ b/include/wx/msw/spinbutt.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __SPINBUTTH__ -#define __SPINBUTTH__ +#ifndef _WX_SPINBUTT_H_ +#define _WX_SPINBUTT_H_ #ifdef __GNUG__ #pragma interface "spinbutt.h" @@ -102,6 +102,6 @@ typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&); { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func }, #endif - // __WIN95__ + // _WX_WIN95__ #endif - // __SPINBUTTH__ + // _WX_SPINBUTT_H_ diff --git a/include/wx/msw/statbmp.h b/include/wx/msw/statbmp.h index 3a5fd03e74..b6aca08bb1 100644 --- a/include/wx/msw/statbmp.h +++ b/include/wx/msw/statbmp.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __STATBMPH__ -#define __STATBMPH__ +#ifndef _WX_STATBMP_H_ +#define _WX_STATBMP_H_ #ifdef __GNUG__ #pragma interface "statbmp.h" @@ -64,4 +64,4 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl }; #endif - // __STATBMPH__ + // _WX_STATBMP_H_ diff --git a/include/wx/msw/statbox.h b/include/wx/msw/statbox.h index e1970721ae..97e3722a70 100644 --- a/include/wx/msw/statbox.h +++ b/include/wx/msw/statbox.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __STATBOXH__ -#define __STATBOXH__ +#ifndef _WX_STATBOX_H_ +#define _WX_STATBOX_H_ #ifdef __GNUG__ #pragma interface "statbox.h" @@ -60,4 +60,4 @@ DECLARE_EVENT_TABLE() }; #endif - // __STATBOXH__ + // _WX_STATBOX_H_ diff --git a/include/wx/msw/statbr95.h b/include/wx/msw/statbr95.h index 1b8bd8d8b6..4950dd85b8 100644 --- a/include/wx/msw/statbr95.h +++ b/include/wx/msw/statbr95.h @@ -6,7 +6,7 @@ // Created: 04.04.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _STATBR95_H diff --git a/include/wx/msw/stattext.h b/include/wx/msw/stattext.h index 8dd0bcb76f..dbb3646a0a 100644 --- a/include/wx/msw/stattext.h +++ b/include/wx/msw/stattext.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __STATTEXTH__ -#define __STATTEXTH__ +#ifndef _WX_STATTEXT_H_ +#define _WX_STATTEXT_H_ #ifdef __GNUG__ #pragma interface "stattext.h" @@ -61,4 +61,4 @@ class WXDLLEXPORT wxStaticText: public wxControl }; #endif - // __STATTEXTH__ + // _WX_STATTEXT_H_ diff --git a/include/wx/msw/tabctrl.h b/include/wx/msw/tabctrl.h index b5c076eb7f..798c61b322 100644 --- a/include/wx/msw/tabctrl.h +++ b/include/wx/msw/tabctrl.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __TABCTRLH__ -#define __TABCTRLH__ +#ifndef _WX_TABCTRL_H_ +#define _WX_TABCTRL_H_ #ifdef __GNUG__ #pragma interface "tabctrl.h" @@ -150,4 +150,4 @@ typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&); id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL }, #endif - // __TABCTRLH__ + // _WX_TABCTRL_H_ diff --git a/include/wx/msw/tbar95.h b/include/wx/msw/tbar95.h index cf7473f1dd..404e21f0fc 100644 --- a/include/wx/msw/tbar95.h +++ b/include/wx/msw/tbar95.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __TBAR95H__ -#define __TBAR95H__ +#ifndef _WX_TBAR95_H_ +#define _WX_TBAR95_H_ #ifdef __GNUG__ #pragma interface "tbar95.h" @@ -93,4 +93,4 @@ DECLARE_EVENT_TABLE() #endif // USE_TOOL/BUTTONBAR #endif - // __TBAR95H__ + // _WX_TBAR95_H_ diff --git a/include/wx/msw/tbarmsw.h b/include/wx/msw/tbarmsw.h index 82201b78d8..f39ee7bd71 100644 --- a/include/wx/msw/tbarmsw.h +++ b/include/wx/msw/tbarmsw.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __TBARMSWH__ -#define __TBARMSWH__ +#ifndef _WX_TBARMSW_H_ +#define _WX_TBARMSW_H_ #ifdef __GNUG__ #pragma interface "tbarmsw.h" @@ -120,4 +120,4 @@ DECLARE_EVENT_TABLE() #endif // USE_TOOL/BUTTONBAR #endif - // __TBARMSWH__ + // _WX_TBARMSW_H_ diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 23e3e12f7c..1e8e351f02 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __TEXTCTRLH__ -#define __TEXTCTRLH__ +#ifndef _WX_TEXTCTRL_H_ +#define _WX_TEXTCTRL_H_ #ifdef __GNUG__ #pragma interface "textctrl.h" @@ -153,4 +153,4 @@ protected: }; #endif - // __TEXTCTRLH__ + // _WX_TEXTCTRL_H_ diff --git a/include/wx/msw/timer.h b/include/wx/msw/timer.h index a6e6d4d3f8..42287be447 100644 --- a/include/wx/msw/timer.h +++ b/include/wx/msw/timer.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __TIMERH__ -#define __TIMERH_ +#ifndef _WX_TIMER_H_ +#define _WX_TIMER_H_ #ifdef __GNUG__ #pragma interface "timer.h" @@ -49,4 +49,4 @@ bool WXDLLEXPORT wxGetLocalTime(long *timeZone, int *dstObserved); long WXDLLEXPORT wxGetCurrentTime(void); #endif - // __TIMERH_ + // _WX_TIMERH_ diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 4f716a9d13..24eb312a81 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __TREECTRLH__ -#define __TREECTRLH__ +#ifndef _WX_TREECTRL_H_ +#define _WX_TREECTRL_H_ #ifdef __GNUG__ #pragma interface "treectrl.h" @@ -192,7 +192,7 @@ public: // bounding rect bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const; // - wxTextCtrl& GetEditControl() const; + wxTextCtrl* GetEditControl() const; // operations // ---------- @@ -217,7 +217,13 @@ public: bool SelectItem(long item); bool ScrollTo(long item); bool DeleteAllItems(); - wxTextCtrl& Edit(long item); + + // Edit the label (tree must have the focus) + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit + bool EndEditLabel(bool cancel); + long HitTest(const wxPoint& point, int& flags); // wxImageList *CreateDragImage(long item); bool SortChildren(long item); @@ -229,9 +235,9 @@ public: bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); protected: - wxTextCtrl m_textCtrl; - wxImageList *m_imageListNormal; - wxImageList *m_imageListState; + wxTextCtrl* m_textCtrl; + wxImageList* m_imageListNormal; + wxImageList* m_imageListState; DECLARE_DYNAMIC_CLASS(wxTreeCtrl) }; @@ -289,4 +295,4 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); #define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #endif - // __TREECTRLH__ + // _WX_TREECTRL_H_ diff --git a/include/wx/msw/wave.h b/include/wx/msw/wave.h index 344fc7ced5..ce7e14fbe4 100644 --- a/include/wx/msw/wave.h +++ b/include/wx/msw/wave.h @@ -5,12 +5,12 @@ // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __WAVEH__ -#define __WAVEH__ +#ifndef _WX_WAVE_H_ +#define _WX_WAVE_H_ #ifdef __GNUG__ #pragma interface "wave.h" diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 4200fbeaa4..1ab4f69b50 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __WINDOWH__ -#define __WINDOWH__ +#ifndef _WX_WINDOW_H_ +#define _WX_WINDOW_H_ #ifdef __GNUG__ #pragma interface "window.h" @@ -84,7 +84,6 @@ class WXDLLEXPORT wxWindow: public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxWindow) - friend class wxUpdateIterator; friend class wxDC; friend class wxPaintDC; @@ -604,7 +603,7 @@ protected: bool m_useCtl3D; // Using CTL3D for this control bool m_inOnSize; // Protection against OnSize reentry -#ifndef __WIN32__ +#ifndef _WX_WIN32__ // Pointer to global memory, for EDIT controls that need // special treatment to reduce USER area consumption. WXHGLOBAL m_globalHandle; @@ -732,32 +731,6 @@ inline bool wxWindow::IsBeingDeleted(void) { return m_isBeingDeleted; } // Window specific (so far) wxWindow* WXDLLEXPORT wxGetActiveWindow(void); -// OBSOLETE -#if 0 -// Allows iteration through damaged rectangles in OnPaint -class WXDLLEXPORT wxUpdateIterator -{ - int rects; // How many rects in Update region - int current; // Current rectangle index - void *rp; // current rectangle -#ifdef __WIN32__ - WXRGNDATA *rlist; // Storage for regiondata -#endif - - public: - wxUpdateIterator(wxWindow* wnd); - ~wxUpdateIterator(void); - - operator int (void); - wxUpdateIterator* operator ++(int); - void GetRect(wxRectangle *rect); - int GetX(); - int GetY(); - int GetW(); - int GetH(); -}; -#endif - WXDLLEXPORT_DATA(extern wxList) wxTopLevelWindows; int WXDLLEXPORT wxCharCodeMSWToWX(int keySym); @@ -767,4 +740,4 @@ int WXDLLEXPORT wxCharCodeWXToMSW(int id, bool *IsVirtual); int WXDLLEXPORT NewControlId(void); #endif - // __WINDOWH__ + // _WX_WINDOW_H_ diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 0aeb411e18..e2196354b9 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -672,6 +672,10 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *ex expr->AssignAttributeValue("label_colour", &labelColourHex); expr->AssignAttributeValue("button_colour", &buttonColourHex); + long id = 0; + expr->GetAttributeValue("id", id); + dialogItem->SetId(id); + if (style) { windowStyle = wxParseWindowStyle(style); @@ -1845,6 +1849,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] = /* wxTreeCtrl */ { "wxTR_HAS_BUTTONS", wxTR_HAS_BUTTONS }, { "wxTR_EDIT_LABELS", wxTR_EDIT_LABELS }, + { "wxTR_LINES_AT_ROOT", wxTR_LINES_AT_ROOT }, /* wxListCtrl */ { "wxLC_ICON", wxLC_ICON }, @@ -1892,6 +1897,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] = /* wxToolBar */ { "wxTB_3DBUTTONS", wxTB_3DBUTTONS}, + { "wxTB_HORIZONTAL", wxTB_HORIZONTAL}, + { "wxTB_VERTICAL", wxTB_VERTICAL}, + { "wxTB_FLAT", wxTB_FLAT}, /* Generic */ { "wxVSCROLL", wxVSCROLL }, @@ -2907,6 +2915,7 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName, long modalStyle = isModal ? wxDIALOG_MODAL : 0; if (!dialogBox->Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name)) return FALSE; + dialogBox->SetClientSize(width, height); } else { diff --git a/src/msw/app.cpp b/src/msw/app.cpp index f236497107..5001e54430 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -53,9 +53,11 @@ #endif // use debug CRT functions for memory leak detections in VC++ +/* THIS CRAPS OUT in VC++ 5. #if defined(__WXDEBUG__) && defined(_MSC_VER) #include #endif +*/ extern char *wxBuffer; extern char *wxOsVersion; @@ -430,12 +432,15 @@ int wxEntry(WXHINSTANCE hInstance, WXHINSTANCE WXUNUSED(hPrevInstance), char *m_ { wxhInstance = (HINSTANCE) hInstance; +/* No, sorry, whatever this is, forget it. Doesn't work with VC++ 5. + #if defined(__WXDEBUG__) && defined(_MSC_VER) // do check for memory leaks on program exit // (another useful flag is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free // deallocated memory which may be used to simulate low-memory condition) _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); #endif // debug build under MS VC++ +*/ #if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 18949f0212..2945076d06 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -58,7 +58,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; SetForegroundColour(parent->GetDefaultForegroundColour()) ; - no_strings = n; + m_noStrings = n; m_windowStyle = style; @@ -121,19 +121,19 @@ void wxChoice::Append(const wxString& item) { SendMessage((HWND) GetHWND(), CB_ADDSTRING, 0, (LONG)(const char *)item); - no_strings ++; + m_noStrings ++; } void wxChoice::Delete(int n) { - no_strings = (int)SendMessage((HWND) GetHWND(), CB_DELETESTRING, n, 0); + m_noStrings = (int)SendMessage((HWND) GetHWND(), CB_DELETESTRING, n, 0); } void wxChoice::Clear(void) { SendMessage((HWND) GetHWND(), CB_RESETCONTENT, 0, 0); - no_strings = 0; + m_noStrings = 0; } @@ -218,14 +218,14 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) if (width <= 0) { // Find the longest string - if (no_strings == 0) + if (m_noStrings == 0) control_width = (float)100.0; else { int len, ht; float longest = (float)0.0; int i; - for (i = 0; i < no_strings; i++) + for (i = 0; i < m_noStrings; i++) { wxString str(GetString(i)); GetTextExtent(str, &len, &ht, NULL, NULL,GetFont()); @@ -239,9 +239,9 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags) // Choice drop-down list depends on number of items (limited to 10) if (h1 <= 0) { - if (no_strings == 0) + if (m_noStrings == 0) h1 = (int)(EDIT_CONTROL_FACTOR*cy*10.0); - else h1 = (int)(EDIT_CONTROL_FACTOR*cy*(wxMin(10, no_strings) + 1)); + else h1 = (int)(EDIT_CONTROL_FACTOR*cy*(wxMin(10, m_noStrings) + 1)); } // If non-default width... diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index e18bb2af6b..df7bd24b0b 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -59,7 +59,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) wxColourDialog::wxColourDialog(void) { - dialogParent = NULL; + m_dialogParent = NULL; } wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) @@ -69,10 +69,10 @@ wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data) bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) { - dialogParent = parent; - + m_dialogParent = parent; + if (data) - colourData = *data; + m_colourData = *data; return TRUE; } @@ -84,16 +84,16 @@ int wxColourDialog::ShowModal(void) int i; for (i = 0; i < 16; i++) - custColours[i] = RGB(colourData.custColours[i].Red(), colourData.custColours[i].Green(), colourData.custColours[i].Blue()); + custColours[i] = RGB(m_colourData.custColours[i].Red(), m_colourData.custColours[i].Green(), m_colourData.custColours[i].Blue()); chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); - chooseColorStruct.hwndOwner = (HWND) (dialogParent ? (HWND) dialogParent->GetHWND() : NULL); - chooseColorStruct.rgbResult = RGB(colourData.dataColour.Red(), colourData.dataColour.Green(), colourData.dataColour.Blue()); + chooseColorStruct.hwndOwner = (HWND) (m_dialogParent ? (HWND) m_dialogParent->GetHWND() : NULL); + chooseColorStruct.rgbResult = RGB(m_colourData.dataColour.Red(), m_colourData.dataColour.Green(), m_colourData.dataColour.Blue()); chooseColorStruct.lpCustColors = custColours; chooseColorStruct.Flags = CC_RGBINIT; - if (!colourData.GetChooseFull()) + if (!m_colourData.GetChooseFull()) chooseColorStruct.Flags |= CC_PREVENTFULLOPEN; // Do the modal dialog @@ -112,11 +112,11 @@ int wxColourDialog::ShowModal(void) // Restore values for (i = 0; i < 16; i++) { - colourData.custColours[i].Set(GetRValue(custColours[i]), GetGValue(custColours[i]), + m_colourData.custColours[i].Set(GetRValue(custColours[i]), GetGValue(custColours[i]), GetBValue(custColours[i])); } - colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult), + m_colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult), GetBValue(chooseColorStruct.rgbResult)); return success ? wxID_OK : wxID_CANCEL; diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index b53e312577..146d1bd5a7 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -71,7 +71,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; SetForegroundColour(parent->GetDefaultForegroundColour()) ; - no_strings = n; + m_noStrings = n; m_windowStyle = style; diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 59f74d78c3..4c8cbcbae7 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -59,7 +59,7 @@ END_EVENT_TABLE() long wxDialog::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { - return ::CallWindowProc((FARPROC)m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); + return ::CallWindowProc(CASTWNDPROC m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); } bool wxDialog::MSWProcessMessage(WXMSG* pMsg) diff --git a/src/msw/fontdlg.cpp b/src/msw/fontdlg.cpp index 0e335774d2..d2c23a9d41 100644 --- a/src/msw/fontdlg.cpp +++ b/src/msw/fontdlg.cpp @@ -56,7 +56,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) wxFontDialog::wxFontDialog(void) { - dialogParent = NULL; + m_dialogParent = NULL; } wxFontDialog::wxFontDialog(wxWindow *parent, wxFontData *data) @@ -66,10 +66,10 @@ wxFontDialog::wxFontDialog(wxWindow *parent, wxFontData *data) bool wxFontDialog::Create(wxWindow *parent, wxFontData *data) { - dialogParent = parent; - + m_dialogParent = parent; + if (data) - fontData = *data; + m_fontData = *data; return TRUE; } @@ -83,28 +83,28 @@ int wxFontDialog::ShowModal(void) memset(&chooseFontStruct, 0, sizeof(CHOOSEFONT)); chooseFontStruct.lStructSize = sizeof(CHOOSEFONT); - chooseFontStruct.hwndOwner = (HWND) (dialogParent ? (HWND) dialogParent->GetHWND() : NULL); + chooseFontStruct.hwndOwner = (HWND) (m_dialogParent ? (HWND) m_dialogParent->GetHWND() : NULL); chooseFontStruct.lpLogFont = &logFont; - if (fontData.initialFont.Ok()) + if (m_fontData.initialFont.Ok()) { flags |= CF_INITTOLOGFONTSTRUCT; - wxFillLogFont(&logFont, & fontData.initialFont); + wxFillLogFont(&logFont, & m_fontData.initialFont); } chooseFontStruct.iPointSize = 0; - chooseFontStruct.rgbColors = RGB((BYTE)fontData.fontColour.Red(), (BYTE)fontData.fontColour.Green(), (BYTE)fontData.fontColour.Blue()); + chooseFontStruct.rgbColors = RGB((BYTE)m_fontData.fontColour.Red(), (BYTE)m_fontData.fontColour.Green(), (BYTE)m_fontData.fontColour.Blue()); - if (!fontData.GetAllowSymbols()) + if (!m_fontData.GetAllowSymbols()) flags |= CF_ANSIONLY; - if (fontData.GetEnableEffects()) + if (m_fontData.GetEnableEffects()) flags |= CF_EFFECTS; - if (fontData.GetShowHelp()) + if (m_fontData.GetShowHelp()) flags |= CF_SHOWHELP; - if (!(fontData.minSize == 0 && fontData.maxSize == 0)) + if (!(m_fontData.minSize == 0 && m_fontData.maxSize == 0)) { - chooseFontStruct.nSizeMin = fontData.minSize; - chooseFontStruct.nSizeMax = fontData.maxSize; + chooseFontStruct.nSizeMin = m_fontData.minSize; + chooseFontStruct.nSizeMax = m_fontData.maxSize; flags |= CF_LIMITSIZE; } @@ -115,9 +115,9 @@ int wxFontDialog::ShowModal(void) // Restore values if (success) { - fontData.fontColour.Set(GetRValue(chooseFontStruct.rgbColors), GetGValue(chooseFontStruct.rgbColors), + m_fontData.fontColour.Set(GetRValue(chooseFontStruct.rgbColors), GetGValue(chooseFontStruct.rgbColors), GetBValue(chooseFontStruct.rgbColors)); - fontData.chosenFont = wxCreateFontFromLogFont(&logFont); + m_fontData.chosenFont = wxCreateFontFromLogFont(&logFont); } return success ? wxID_OK : wxID_CANCEL; diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index e595d65996..2862f24775 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -54,6 +54,7 @@ wxListCtrl::wxListCtrl(void) m_imageListState = NULL; m_baseStyle = 0; m_colCount = 0; + m_textCtrl = NULL; } bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -62,6 +63,7 @@ bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con m_imageListNormal = NULL; m_imageListSmall = NULL; m_imageListState = NULL; + m_textCtrl = NULL; m_colCount = 0; wxSystemSettings settings; @@ -129,7 +131,13 @@ bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con wxListCtrl::~wxListCtrl(void) { - m_textCtrl.SetHWND((WXHWND) NULL); + if (m_textCtrl) + { + m_textCtrl->UnsubclassWin(); + m_textCtrl->SetHWND(0); + delete m_textCtrl; + m_textCtrl = NULL; + } } // Add or remove a single window style @@ -441,11 +449,9 @@ int wxListCtrl::GetCountPerPage(void) const } // Gets the edit control for editing labels. -wxTextCtrl& wxListCtrl::GetEditControl(void) const +wxTextCtrl* wxListCtrl::GetEditControl(void) const { - HWND hWnd = (HWND) ListView_GetEditControl((HWND) GetHWND()); - ((wxListCtrl *)this)->m_textCtrl.SetHWND((WXHWND) hWnd); - return (wxTextCtrl&)m_textCtrl; + return m_textCtrl; } // Gets information about the item @@ -806,14 +812,49 @@ void wxListCtrl::ClearAll(void) DeleteAllColumns(); } -// Edits a label -wxTextCtrl& wxListCtrl::Edit(long item) +wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) +{ + wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) ); + + HWND hWnd = (HWND) ListView_EditLabel((HWND) GetHWND(), item); + + if (m_textCtrl) + { + m_textCtrl->UnsubclassWin(); + m_textCtrl->SetHWND(0); + delete m_textCtrl; + m_textCtrl = NULL; + } + + m_textCtrl = (wxTextCtrl*) textControlClass->CreateObject(); + m_textCtrl->SetHWND((WXHWND) hWnd); + m_textCtrl->SubclassWin((WXHWND) hWnd); + + return m_textCtrl; +} + +// End label editing, optionally cancelling the edit +bool wxListCtrl::EndEditLabel(bool cancel) { - HWND hWnd = (HWND) ListView_EditLabel((HWND) GetHWND(), (int) item); - m_textCtrl.SetHWND((WXHWND) hWnd); - return m_textCtrl; + wxASSERT( FALSE); + +/* I don't know how to implement this: there's no such macro as ListView_EndEditLabelNow. + * ??? + bool success = (ListView_EndEditLabelNow((HWND) GetHWND(), cancel) != 0); + + if (m_textCtrl) + { + m_textCtrl->UnsubclassWin(); + m_textCtrl->SetHWND(0); + delete m_textCtrl; + m_textCtrl = NULL; + } + return success; +*/ + return FALSE; } + // Ensures this item is visible bool wxListCtrl::EnsureVisible(long item) { diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index e1a6b0d587..fdb27c0822 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1223,7 +1223,7 @@ long wxMDIClientWindow::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa long wxMDIClientWindow::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { if ( MSWGetOldWndProc() != 0) - return ::CallWindowProc((FARPROC)MSWGetOldWndProc(), (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); + return ::CallWindowProc(CASTWNDPROC MSWGetOldWndProc(), (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); else return ::DefWindowProc((HWND) m_hWnd, (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); } diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp index d792e4ec4a..346e95d9b9 100644 --- a/src/msw/minifram.cpp +++ b/src/msw/minifram.cpp @@ -45,7 +45,7 @@ long wxMiniFrame::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam (GetWindowStyleFlag() & wxTINY_CAPTION_VERT)) return ::ibDefWindowProc((HWND) GetHWND(), nMsg, wParam, lParam); else if ( m_oldWndProc ) - return ::CallWindowProc((FARPROC)m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); + return ::CallWindowProc(CASTWNDPROC m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); else return ::DefWindowProc((HWND) GetHWND(), nMsg, wParam, lParam); } diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index d9ccfd0e0c..ef1417069f 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -53,6 +53,7 @@ wxTreeCtrl::wxTreeCtrl(void) { m_imageListNormal = NULL; m_imageListState = NULL; + m_textCtrl = NULL; } bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -67,6 +68,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con m_imageListNormal = NULL; m_imageListState = NULL; + m_textCtrl = NULL; int x = pos.x; int y = pos.y; @@ -131,7 +133,12 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con wxTreeCtrl::~wxTreeCtrl(void) { - m_textCtrl.SetHWND((WXHWND) NULL); + if (m_textCtrl) + { + m_textCtrl->UnsubclassWin(); + m_textCtrl->SetHWND((WXHWND) 0); + delete m_textCtrl; + } } // Attributes @@ -412,11 +419,9 @@ bool wxTreeCtrl::GetItemRect(long item, wxRectangle& rect, bool textOnly) const return success; } -wxTextCtrl& wxTreeCtrl::GetEditControl(void) const +wxTextCtrl* wxTreeCtrl::GetEditControl(void) const { - HWND hWnd = (HWND) TreeView_GetEditControl((HWND) GetHWND()); - ((wxTreeCtrl *)this)->m_textCtrl.SetHWND((WXHWND) hWnd); - return (wxTextCtrl&) m_textCtrl; + return m_textCtrl; } // Operations @@ -527,11 +532,40 @@ bool wxTreeCtrl::DeleteAllItems(void) return (TreeView_DeleteAllItems((HWND) GetHWND()) != 0); } -wxTextCtrl& wxTreeCtrl::Edit(long item) +wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass) +{ + wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) ); + + HWND hWnd = (HWND) TreeView_EditLabel((HWND) GetHWND(), item); + + if (m_textCtrl) + { + m_textCtrl->UnsubclassWin(); + m_textCtrl->SetHWND(0); + delete m_textCtrl; + m_textCtrl = NULL; + } + + m_textCtrl = (wxTextCtrl*) textControlClass->CreateObject(); + m_textCtrl->SetHWND((WXHWND) hWnd); + m_textCtrl->SubclassWin((WXHWND) hWnd); + + return m_textCtrl; +} + +// End label editing, optionally cancelling the edit +bool wxTreeCtrl::EndEditLabel(bool cancel) { - HWND hWnd = (HWND) TreeView_EditLabel((HWND) GetHWND(), item); - m_textCtrl.SetHWND((WXHWND) hWnd); - return m_textCtrl; + bool success = (TreeView_EndEditLabelNow((HWND) GetHWND(), cancel) != 0); + + if (m_textCtrl) + { + m_textCtrl->UnsubclassWin(); + m_textCtrl->SetHWND(0); + delete m_textCtrl; + m_textCtrl = NULL; + } + return success; } long wxTreeCtrl::HitTest(const wxPoint& point, int& flags) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 7ec89863e5..48495e2e69 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1874,7 +1874,7 @@ void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event) long wxWindow::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { if ( m_oldWndProc ) - return ::CallWindowProc((FARPROC)m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); + return ::CallWindowProc(CASTWNDPROC m_oldWndProc, (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam); else return ::DefWindowProc((HWND) GetHWND(), nMsg, wParam, lParam); } diff --git a/utils/dialoged/src/makefile.b32 b/utils/dialoged/src/makefile.b32 index bda1b8a670..775201c4ae 100644 --- a/utils/dialoged/src/makefile.b32 +++ b/utils/dialoged/src/makefile.b32 @@ -38,7 +38,7 @@ DEBUG_FLAGS = !endif CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) @$(INCFILE) -OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj winprop.obj edtree.obj edlist.obj +OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj winprop.obj edtree.obj edlist.obj symbtable.obj winstyle.obj $(TARGET).exe: wxprop $(INCFILE) $(OBJECTS) $(TARGET).def $(TARGET).res tlink32 $(LINKFLAGS) @&&! diff --git a/utils/dialoged/src/makefile.g95 b/utils/dialoged/src/makefile.g95 index c1fafdcc45..06db47a2fb 100644 --- a/utils/dialoged/src/makefile.g95 +++ b/utils/dialoged/src/makefile.g95 @@ -16,7 +16,7 @@ include $(WXDIR)/src/makeg95.env OBJECTS = $(OBJDIR)/dialoged.$(OBJSUFF) $(OBJDIR)/reseditr.$(OBJSUFF)\ $(OBJDIR)/dlghndlr.$(OBJSUFF) $(OBJDIR)/reswrite.$(OBJSUFF) $(OBJDIR)/winprop.$(OBJSUFF)\ - $(OBJDIR)/edlist.$(OBJSUFF) $(OBJDIR)/edtree.$(OBJSUFF)\ + $(OBJDIR)/edlist.$(OBJSUFF) $(OBJDIR)/edtree.$(OBJSUFF) $(OBJDIR)/winstyle.$(OBJSUFF) $(OBJDIR)/symbtabl.$(OBJSUFF)\ $(OBJDIR)/dialoged_resources.$(OBJSUFF) EXTRAINC = -I../../wxprop/src @@ -58,6 +58,12 @@ $(OBJDIR)/edlist.$(OBJSUFF): winprop.h edlist.h edlist.$(SRCSUFF) $(OBJDIR)/edtree.$(OBJSUFF): winprop.h edtree.h edtree.$(SRCSUFF) $(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF) +$(OBJDIR)/winstyle.$(OBJSUFF): winstyle.h winstyle.$(SRCSUFF) + $(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF) + +$(OBJDIR)/symbtabl.$(OBJSUFF): symbtabl.h symbtabl.$(SRCSUFF) + $(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF) + $(OBJDIR)/dialoged_resources.o: dialoged.rc $(RESCOMP) -i dialoged.rc -o $(OBJDIR)/dialoged_resources.o $(RESFLAGS) diff --git a/utils/dialoged/src/makefile.nt b/utils/dialoged/src/makefile.nt index ee113fa8af..0dddc41986 100644 --- a/utils/dialoged/src/makefile.nt +++ b/utils/dialoged/src/makefile.nt @@ -26,7 +26,7 @@ LOCALDOCDIR=$(WXDIR)\utils\dialoged\docs PROGRAM=dialoged OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj\ - winprop.obj edtree.obj edlist.obj symbtabl.obj + winprop.obj edtree.obj edlist.obj symbtabl.obj winstyle.obj all: wxprop dialoged.exe @@ -88,6 +88,11 @@ symbtabl.obj: symbtabl.h symbtabl.$(SRCSUFF) $(DUMMYOBJ) $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) << +winstyle.obj: winstyle.h winstyle.$(SRCSUFF) $(DUMMYOBJ) + $(cc) @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) +<< + $(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 6e98372ef5..ab4ff91601 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -141,7 +141,7 @@ bool wxResourceManager::Initialize() m_optionsResourceFilename = buf; #elif defined(__X__) char buf[500]; - ()wxGetHomeDir(buf); + wxGetHomeDir(buf); strcat(buf, "/.dialogedrc"); m_optionsResourceFilename = buf; #else @@ -329,6 +329,7 @@ bool wxResourceManager::Save(const wxString& filename) InstantiateAllResourcesFromWindows(); if (m_resourceTable.Save(filename)) { + m_symbolTable.WriteIncludeFile(m_symbolFilename); Modify(FALSE); return TRUE; } @@ -345,6 +346,15 @@ bool wxResourceManager::SaveAs() return FALSE; m_currentFilename = s; + wxStripExtension(m_currentFilename); + m_currentFilename += ".wxr"; + + // Construct include filename from this file + m_symbolFilename = m_currentFilename; + + wxStripExtension(m_symbolFilename); + m_symbolFilename += ".h"; + Save(m_currentFilename); return TRUE; } @@ -401,6 +411,8 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename) { wxString str("Could not find include file "); str += m_symbolFilename; + str += ".\nDialog Editor maintains a header file containing id symbols to be used in the application.\n"; + str += "The next time this .wxr file is saved, a header file will be saved also."; wxMessageBox(str, "Dialog Editor Warning", MB_OK); m_symbolIdCounter = 99; @@ -410,6 +422,19 @@ bool wxResourceManager::New(bool loadFromFile, const wxString& filename) // Set the id counter to the last known id m_symbolIdCounter = m_symbolTable.FindHighestId(); } + + // Now check in case some (or all) resources don't have resource ids, or they + // don't match the .h file, or something of that nature. + bool altered = RepairResourceIds(); + if (altered) + { + wxMessageBox("Some resources have had new identifiers associated with them, since they were missing.", "Dialog Editor Warning", MB_OK); + Modify(TRUE); + } + else + Modify(FALSE); + + return TRUE; } else { @@ -885,11 +910,10 @@ bool wxResourceManager::CreateNewPanel() ClearCurrentDialog(); char buf[256]; - MakeUniqueName("panel", buf); + MakeUniqueName("dialog", buf); wxItemResource *resource = new wxItemResource; -// resource->SetType(wxTYPE_PANEL); - resource->SetType("wxPanel"); + resource->SetType("wxDialog"); resource->SetName(buf); resource->SetTitle(buf); @@ -904,10 +928,10 @@ bool wxResourceManager::CreateNewPanel() wxPanel *panel = new wxPanel(m_editorPanel, -1, wxPoint(m_editorPanel->GetMarginX(), m_editorPanel->GetMarginY()), - wxSize(400, 300), wxRAISED_BORDER, buf); + wxSize(400, 300), wxRAISED_BORDER|wxDEFAULT_DIALOG_STYLE, buf); m_editorPanel->m_childWindow = panel; - resource->SetStyle(0); // panel->GetWindowStyleFlag()); + resource->SetStyle(panel->GetWindowStyleFlag()); resource->SetSize(10, 10, 400, 300); // For editing in situ we will need to use the hash table to ensure @@ -992,7 +1016,7 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel * } else if (itemType == "wxListBox") { - prefix = "ID_LISTBIX"; + prefix = "ID_LISTBOX"; MakeUniqueName("listbox", buf); res->SetName(buf); newItem = new wxListBox(panel, -1, wxPoint(x, y), wxSize(-1, -1), 0, NULL, 0, wxDefaultValidator, buf); @@ -1114,14 +1138,14 @@ bool wxResourceManager::TestCurrentDialog(wxWindow* parent) wxDialog* dialog = new wxDialog; long oldStyle = item->GetStyle(); bool success = FALSE; - item->SetStyle(wxDEFAULT_DIALOG_STYLE); +// item->SetStyle(wxDEFAULT_DIALOG_STYLE); if (dialog->LoadFromResource(parent, item->GetName(), & m_resourceTable)) { dialog->Centre(); dialog->ShowModal(); success = TRUE; } - item->SetStyle(oldStyle); +// item->SetStyle(oldStyle); return success; } return FALSE; @@ -1521,12 +1545,13 @@ bool wxResourceManager::IsSymbolUsed(wxItemResource* thisResource, wxWindowID id while (node = m_resourceTable.Next()) { wxItemResource *res = (wxItemResource *)node->Data(); - if ((res != thisResource) && (res->GetId() == id)) - return TRUE; wxString resType(res->GetType()); if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") { + if ((res != thisResource) && (res->GetId() == id)) + return TRUE; + wxNode *node1 = res->GetChildren().First(); while (node1) { @@ -1563,12 +1588,13 @@ void wxResourceManager::ChangeIds(int oldId, int newId) while (node = m_resourceTable.Next()) { wxItemResource *res = (wxItemResource *)node->Data(); - if (res->GetId() == oldId) - res->SetId(newId); wxString resType(res->GetType()); if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") { + if (res->GetId() == oldId) + res->SetId(newId); + wxNode *node1 = res->GetChildren().First(); while (node1) { @@ -1582,6 +1608,71 @@ void wxResourceManager::ChangeIds(int oldId, int newId) } } +// If any resource ids were missing (or their symbol was missing), +// repair them i.e. give them new ids. Returns TRUE if any resource +// needed repairing. +bool wxResourceManager::RepairResourceIds() +{ + bool repaired = FALSE; + + m_resourceTable.BeginFind(); + wxNode *node; + while (node = m_resourceTable.Next()) + { + wxItemResource *res = (wxItemResource *)node->Data(); + wxString resType(res->GetType()); + if (resType == "wxDialog" || resType == "wxDialogBox" || resType == "wxPanel") + { + + if ( (res->GetId() == 0) || ((res->GetId() > 0) && !m_symbolTable.IdExists(res->GetId())) ) + { + wxString newSymbolName; + int newId = GenerateWindowId("ID_DIALOG", newSymbolName) ; + + if (res->GetId() == 0) + { + res->SetId(newId); + m_symbolTable.AddSymbol(newSymbolName, newId); + } + else + { + m_symbolTable.AddSymbol(newSymbolName, res->GetId()); + } + + repaired = TRUE; + } + + wxNode *node1 = res->GetChildren().First(); + while (node1) + { + wxItemResource *child = (wxItemResource *)node1->Data(); + + if ( (child->GetId() == 0) || ((child->GetId() > 0) && !m_symbolTable.IdExists(child->GetId())) ) + { + wxString newSymbolName; + int newId = GenerateWindowId("ID_CONTROL", newSymbolName) ; + + if (child->GetId() == 0) + { + child->SetId(newId); + m_symbolTable.AddSymbol(newSymbolName, newId); + } + else + { + m_symbolTable.AddSymbol(newSymbolName, child->GetId()); + } + + repaired = TRUE; + } + + node1 = node1->Next(); + } + } + } + return repaired; +} + + // Deletes 'win' and creates a new window from the resource that // was associated with it. E.g. if you can't change properties on the // fly, you'll need to delete the window and create it again. diff --git a/utils/dialoged/src/reseditr.h b/utils/dialoged/src/reseditr.h index dde51c0ea6..e2dafcc71c 100644 --- a/utils/dialoged/src/reseditr.h +++ b/utils/dialoged/src/reseditr.h @@ -27,6 +27,7 @@ #include "proplist.h" #include "symbtabl.h" +#include "winstyle.h" #define RESED_DELETE 1 #define RESED_RECREATE 3 @@ -112,14 +113,16 @@ class wxResourceTableWithSaving: public wxResourceTable public: wxResourceTableWithSaving():wxResourceTable() { + // Add all known window styles + m_styleTable.Init(); } virtual bool Save(const wxString& filename); virtual bool SaveResource(ostream& stream, wxItemResource *item); - void GenerateWindowStyleString(long windowStyle, char *buf); void GeneratePanelStyleString(long windowStyle, char *buf); void GenerateDialogStyleString(long windowStyle, char *buf); +/* void GenerateRadioBoxStyleString(long windowStyle, char *buf); void GenerateMessageStyleString(long windowStyle, char *buf); void GenerateTextStyleString(long windowStyle, char *buf); @@ -131,13 +134,21 @@ class wxResourceTableWithSaving: public wxResourceTable void GenerateGroupBoxStyleString(long windowStyle, char *buf); void GenerateGaugeStyleString(long windowStyle, char *buf); void GenerateChoiceStyleString(long windowStyle, char *buf); + void GenerateComboBoxStyleString(long windowStyle, char *buf); void GenerateScrollBarStyleString(long windowStyle, char *buf); - void GenerateItemStyleString(long windowStyle, char *buf); - +*/ + + void GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf); + +/* bool GenerateStyle(char *buf, long windowStyle, long flag, char *strStyle); +*/ void OutputFont(ostream& stream, wxFont *font); wxControl *CreateItem(wxPanel *panel, wxItemResource *childResource); + +protected: + wxWindowStyleTable m_styleTable; }; class wxResourceEditorScrolledWindow; @@ -232,6 +243,11 @@ public: // must be changed. void ChangeIds(int oldId, int newId); + // If any resource ids were missing (or their symbol was missing), + // repair them i.e. give them new ids. Returns TRUE if any resource + // needed repairing. + bool RepairResourceIds(); + // Deletes 'win' and creates a new window from the resource that // was associated with it. E.g. if you can't change properties on the // fly, you'll need to delete the window and create it again. diff --git a/utils/dialoged/src/reswrite.cpp b/utils/dialoged/src/reswrite.cpp index 695bf6081d..79084eb227 100644 --- a/utils/dialoged/src/reswrite.cpp +++ b/utils/dialoged/src/reswrite.cpp @@ -108,14 +108,14 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it else { stream << "static char *" << item->GetName() << " = \"panel(name = '" << item->GetName() << "',\\\n"; - GeneratePanelStyleString(item->GetStyle(), styleBuf); + GenerateDialogStyleString(item->GetStyle(), styleBuf); } stream << " style = '" << styleBuf << "',\\\n"; stream << " title = '" << item->GetTitle() << "',\\\n"; + stream << " id = " << item->GetId() << ",\\\n"; stream << " x = " << item->GetX() << ", y = " << item->GetY(); stream << ", width = " << item->GetWidth() << ", height = " << item->GetHeight(); -// stream << " modal = " << item->GetValue1(); - + if (1) // item->GetStyle() & wxNO_3D) { if (item->GetBackgroundColour()) @@ -128,29 +128,6 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it stream << ",\\\n " << "background_colour = '" << buf << "'"; } -#if 0 - if (item->GetLabelColour()) - { - char buf[7]; - wxDecToHex(item->GetLabelColour()->Red(), buf); - wxDecToHex(item->GetLabelColour()->Green(), buf+2); - wxDecToHex(item->GetLabelColour()->Blue(), buf+4); - buf[6] = 0; - - stream << ",\\\n " << "label_colour = '" << buf << "'"; - } - if (item->GetButtonColour()) - { - char buf[7]; - wxDecToHex(item->GetButtonColour()->Red(), buf); - wxDecToHex(item->GetButtonColour()->Green(), buf+2); - wxDecToHex(item->GetButtonColour()->Blue(), buf+4); - buf[6] = 0; - - stream << ",\\\n " << "button_colour = '" << buf << "'"; - } -#endif - } if (item->GetFont() && item->GetFont()->Ok()) @@ -182,8 +159,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxButton" || itemType == "wxBitmapButton") { - GenerateButtonStyleString(item->GetStyle(), styleBuf); - stream << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); if (item->GetValue4()) @@ -196,8 +173,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxStaticText" || itemType == "wxStaticBitmap") { - GenerateMessageStyleString(item->GetStyle(), styleBuf); - stream << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); if (item->GetValue4()) @@ -210,8 +187,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxCheckBox") { - GenerateCheckBoxStyleString(item->GetStyle(), styleBuf); - stream << "wxCheckBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxCheckBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); stream << ", " << item->GetValue1(); @@ -223,8 +200,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxRadioButton") { - GenerateRadioButtonStyleString(item->GetStyle(), styleBuf); - stream << "wxRadioButton, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxRadioButton, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); stream << ", " << item->GetValue1(); @@ -236,8 +213,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxStaticBox") { - GenerateGroupBoxStyleString(item->GetStyle(), styleBuf); - stream << "wxGroupBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxGroupBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); if (item->GetFont()) @@ -248,8 +225,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxText" || itemType == "wxMultiText" || itemType == "wxTextCtrl") { - GenerateTextStyleString(item->GetStyle(), styleBuf); - stream << "wxTextCtrl, "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxTextCtrl, "; stream << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); @@ -262,8 +239,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxGauge") { - GenerateGaugeStyleString(item->GetStyle(), styleBuf); - stream << "wxGauge, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxGauge, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); stream << ", " << item->GetValue1() << ", " << item->GetValue2(); @@ -275,8 +252,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxSlider") { - GenerateSliderStyleString(item->GetStyle(), styleBuf); - stream << "wxSlider, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxSlider, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3(); @@ -288,8 +265,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxScrollBar") { - GenerateScrollBarStyleString(item->GetStyle(), styleBuf); - stream << "wxScrollBar, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxScrollBar, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); stream << ", " << item->GetValue1() << ", " << item->GetValue2() << ", " << item->GetValue3() << ", "; @@ -297,8 +274,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it } else if (itemType == "wxListBox") { - GenerateListBoxStyleString(item->GetStyle(), styleBuf); - stream << "wxListBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxListBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); @@ -343,13 +320,17 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it OutputFont(stream, item->GetFont()); } } - else if (itemType == "wxChoice") + else if (itemType == "wxChoice" || itemType == "wxComboBox") { - GenerateChoiceStyleString(item->GetStyle(), styleBuf); - stream << "wxChoice, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + + stream << item->GetId() << ", " << itemType << ", " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); + if (itemType == "wxComboBox") + stream << SafeWord(item->GetValue4()) << ", "; + // Default list of values stream << ", ["; @@ -375,8 +356,8 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it else if (itemType == "wxRadioBox") { // Must write out the orientation and number of rows/cols!! - GenerateRadioBoxStyleString(item->GetStyle(), styleBuf); - stream << "wxRadioBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; + GenerateControlStyleString(itemType, item->GetStyle(), styleBuf); + stream << item->GetId() << ", " << "wxRadioBox, " << SafeWord(item->GetTitle()) << ", '" << styleBuf << "', "; stream << SafeWord(item->GetName()) << ", " << item->GetX() << ", " << item->GetY() << ", "; stream << item->GetWidth() << ", " << item->GetHeight(); @@ -531,31 +512,13 @@ bool wxResourceTableWithSaving::SaveResource(ostream& stream, wxItemResource *it return TRUE; } -void wxResourceTableWithSaving::GenerateWindowStyleString(long windowStyle, char *buf) -{ - GenerateStyle(buf, windowStyle, wxNO_3D, "wxNO_3D"); - GenerateStyle(buf, windowStyle, wxVSCROLL, "wxVSCROLL"); - GenerateStyle(buf, windowStyle, wxHSCROLL, "wxHSCROLL"); - GenerateStyle(buf, windowStyle, wxBORDER, "wxBORDER"); -} - void wxResourceTableWithSaving::GenerateDialogStyleString(long windowStyle, char *buf) { buf[0] = 0; - GenerateWindowStyleString(windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxDialog", windowStyle, buf); -/* - GenerateStyle(buf, windowStyle, wxRETAINED, "wxRETAINED"); -*/ - if (!GenerateStyle(buf, windowStyle, wxDEFAULT_DIALOG_STYLE, "wxDEFAULT_DIALOG_STYLE")) - { - GenerateStyle(buf, windowStyle, wxCAPTION, "wxCAPTION"); - GenerateStyle(buf, windowStyle, wxTHICK_FRAME, "wxTHICK_FRAME"); - GenerateStyle(buf, windowStyle, wxRESIZE_BORDER, "wxRESIZE_BORDER"); - GenerateStyle(buf, windowStyle, wxSYSTEM_MENU, "wxSYSTEM_MENU"); - GenerateStyle(buf, windowStyle, wxMINIMIZE_BOX, "wxMINIMIZE_BOX"); - GenerateStyle(buf, windowStyle, wxMAXIMIZE_BOX, "wxMAXIMIZE_BOX"); - } if (strlen(buf) == 0) strcat(buf, "0"); } @@ -563,158 +526,25 @@ void wxResourceTableWithSaving::GenerateDialogStyleString(long windowStyle, char void wxResourceTableWithSaving::GeneratePanelStyleString(long windowStyle, char *buf) { buf[0] = 0; - GenerateWindowStyleString(windowStyle, buf); - -/* - GenerateStyle(buf, windowStyle, wxRETAINED, "wxRETAINED"); -*/ - if (strlen(buf) == 0) - strcat(buf, "0"); -} - - -void wxResourceTableWithSaving::GenerateItemStyleString(long windowStyle, char *buf) -{ - GenerateWindowStyleString(windowStyle, buf); - - GenerateStyle(buf, windowStyle, wxHORIZONTAL, "wxHORIZONTAL"); - GenerateStyle(buf, windowStyle, wxVERTICAL, "wxVERTICAL"); -} - -void wxResourceTableWithSaving::GenerateRadioBoxStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} + m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxPanel", windowStyle, buf); -void wxResourceTableWithSaving::GenerateMessageStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - if (strlen(buf) == 0) strcat(buf, "0"); } -void wxResourceTableWithSaving::GenerateTextStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - GenerateStyle(buf, windowStyle, wxTE_PROCESS_ENTER, "wxTE_PROCESS_ENTER"); - GenerateStyle(buf, windowStyle, wxTE_READONLY, "wxTE_READONLY"); - GenerateStyle(buf, windowStyle, wxTE_PASSWORD, "wxTE_PASSWORD"); - GenerateStyle(buf, windowStyle, wxTE_MULTILINE, "wxTE_MULTILINE"); - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateButtonStyleString(long windowStyle, char *buf) +void wxResourceTableWithSaving::GenerateControlStyleString(const wxString& windowClass, long windowStyle, char *buf) { buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} + m_styleTable.GenerateStyleStrings("wxWindow", windowStyle, buf); + m_styleTable.GenerateStyleStrings("wxControl", windowStyle, buf); + m_styleTable.GenerateStyleStrings(windowClass, windowStyle, buf); -void wxResourceTableWithSaving::GenerateCheckBoxStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - if (strlen(buf) == 0) strcat(buf, "0"); } -void wxResourceTableWithSaving::GenerateRadioButtonStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateListBoxStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - GenerateStyle(buf, windowStyle, wxLB_ALWAYS_SB, "wxLB_ALWAYS_SB"); - GenerateStyle(buf, windowStyle, wxLB_SORT, "wxLB_SORT"); -// GenerateStyle(buf, windowStyle, wxLB_SINGLE, "wxLB_SINGLE"); // Done already - GenerateStyle(buf, windowStyle, wxLB_MULTIPLE, "wxLB_MULTIPLE"); - GenerateStyle(buf, windowStyle, wxLB_EXTENDED, "wxLB_EXTENDED"); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateSliderStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateGroupBoxStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateGaugeStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - GenerateStyle(buf, windowStyle, wxGA_PROGRESSBAR, "wxGA_PROGRESSBAR"); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateChoiceStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -void wxResourceTableWithSaving::GenerateScrollBarStyleString(long windowStyle, char *buf) -{ - buf[0] = 0; - GenerateItemStyleString(windowStyle, buf); - - if (strlen(buf) == 0) - strcat(buf, "0"); -} - -bool wxResourceTableWithSaving::GenerateStyle(char *buf, long windowStyle, long flag, char *strStyle) -{ - if ((windowStyle & flag) == flag) - { - if (strlen(buf) > 0) - strcat(buf, " | "); - strcat(buf, strStyle); - return TRUE; - } - else - return FALSE; -} - // Returns quoted string or "NULL" char *SafeString(char *s) { diff --git a/utils/dialoged/src/symbtabl.cpp b/utils/dialoged/src/symbtabl.cpp index 65e038b3d2..a85aefcf83 100644 --- a/utils/dialoged/src/symbtabl.cpp +++ b/utils/dialoged/src/symbtabl.cpp @@ -121,6 +121,13 @@ bool wxResourceSymbolTable::WriteIncludeFile(const wxString& filename) if (!file.Open(filename, wxFile::write)) return FALSE; + wxString fileOnly(wxFileNameFromPath(filename)); + wxString line; + line.Printf("/*\n * %s\n * Window identifiers file written by Dialog Editor\n */\n\n", + (const char*) fileOnly); + + file.Write(line, line.Length()); + m_hashTable.BeginFind(); wxNode* node = m_hashTable.Next(); diff --git a/utils/dialoged/src/winprop.cpp b/utils/dialoged/src/winprop.cpp index 0bb93c4a27..12ae6b0df4 100644 --- a/utils/dialoged/src/winprop.cpp +++ b/utils/dialoged/src/winprop.cpp @@ -74,6 +74,7 @@ wxWindow *wxPropertyInfo::sm_propertyWindow; * wxDialogEditorPropertyListDialog */ + /* wxDialogEditorPropertyListDialog::wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name): @@ -89,6 +90,23 @@ wxDialogEditorPropertyListDialog::~wxDialogEditorPropertyListDialog() delete m_propInfo; wxPropertyInfo::sm_propertyWindow = NULL; } +*/ + +wxDialogEditorPropertyListFrame::wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, + const wxPoint& pos, const wxSize& size, + long style, const wxString& name): + wxPropertyListFrame(v, parent, title, pos, size, style, name) +{ + m_propSheet = NULL; + m_propInfo = NULL; +} + +wxDialogEditorPropertyListFrame::~wxDialogEditorPropertyListFrame() +{ + delete m_propSheet; + delete m_propInfo; + wxPropertyInfo::sm_propertyWindow = NULL; +} /* * wxPropertyInfo @@ -127,32 +145,32 @@ bool wxPropertyInfo::Edit(wxWindow *parent, const wxString& title) propSheet->SetAllModified(FALSE); wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL, -#ifdef __XVIEW__ wxPROP_BUTTON_OK | wxPROP_BUTTON_CANCEL | -#endif wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES); - wxDialogEditorPropertyListDialog *propDialog = new wxDialogEditorPropertyListDialog(view, + wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view, wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y), - wxSize(width, height), wxDEFAULT_DIALOG_STYLE); - sm_propertyWindow = propDialog; + wxSize(width, height), wxDEFAULT_FRAME_STYLE); + sm_propertyWindow = propWin; + + propWin->m_registry.RegisterValidator((wxString)"real", new wxRealListValidator); + propWin->m_registry.RegisterValidator((wxString)"string", new wxStringListValidator); + propWin->m_registry.RegisterValidator((wxString)"integer", new wxIntegerListValidator); + propWin->m_registry.RegisterValidator((wxString)"bool", new wxBoolListValidator); + propWin->m_registry.RegisterValidator((wxString)"filename", new wxFilenameListValidator); + propWin->m_registry.RegisterValidator((wxString)"stringlist", new wxListOfStringsListValidator); + propWin->m_registry.RegisterValidator((wxString)"window_id", new wxResourceSymbolValidator); - propDialog->m_registry.RegisterValidator((wxString)"real", new wxRealListValidator); - propDialog->m_registry.RegisterValidator((wxString)"string", new wxStringListValidator); - propDialog->m_registry.RegisterValidator((wxString)"integer", new wxIntegerListValidator); - propDialog->m_registry.RegisterValidator((wxString)"bool", new wxBoolListValidator); - propDialog->m_registry.RegisterValidator((wxString)"filename", new wxFilenameListValidator); - propDialog->m_registry.RegisterValidator((wxString)"stringlist", new wxListOfStringsListValidator); - propDialog->m_registry.RegisterValidator((wxString)"window_id", new wxResourceSymbolValidator); + propWin->m_propInfo = this; + propWin->m_propSheet = propSheet; - propDialog->m_propInfo = this; - propDialog->m_propSheet = propSheet; +// view->propertyWindow = propWin; + view->AddRegistry(&(propWin->m_registry)); -// view->propertyWindow = propDialog; - view->AddRegistry(&(propDialog->m_registry)); - view->ShowView(propSheet, propDialog); + propWin->Initialize(); + view->ShowView(propSheet, propWin->GetPropertyPanel()); - propDialog->Show(TRUE); + propWin->Show(TRUE); return TRUE; } @@ -511,6 +529,27 @@ bool wxWindowPropertyInfo::InstantiateResource(wxItemResource *resource) return TRUE; } +// Set the window style +void wxWindowPropertyInfo::SetWindowStyle(wxWindow* win, long style, bool set) +{ + if (style == 0) + return; + + if ((win->GetWindowStyleFlag() & style) == style) + { + if (!set) + { + win->SetWindowStyleFlag(win->GetWindowStyleFlag() - style); + } + } + else + { + if (set) + { + win->SetWindowStyleFlag(win->GetWindowStyleFlag() | style); + } + } +} /* * Controls @@ -594,8 +633,8 @@ bool wxButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxButtonPropertyInfo::GetPropertyNames(wxStringList& names) { - names.Add("label"); wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxButtonPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -696,8 +735,8 @@ bool wxStaticTextPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxStaticTextPropertyInfo::GetPropertyNames(wxStringList& names) { - names.Add("label"); wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxStaticTextPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -772,8 +811,8 @@ bool wxStaticBitmapPropertyInfo::SetProperty(wxString& name, wxProperty *propert void wxStaticBitmapPropertyInfo::GetPropertyNames(wxStringList& names) { - names.Add("label"); wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxStaticBitmapPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -856,10 +895,10 @@ bool wxTextPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxTextPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("value"); names.Add("readonly"); names.Add("password"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxTextPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -955,9 +994,9 @@ bool wxListBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxListBoxPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("values"); names.Add("multiple"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxListBoxPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1024,8 +1063,8 @@ bool wxChoicePropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxChoicePropertyInfo::GetPropertyNames(wxStringList& names) { - names.Add("values"); wxItemPropertyInfo::GetPropertyNames(names); + names.Add("values"); } bool wxChoicePropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1144,11 +1183,11 @@ bool wxRadioBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxRadioBoxPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("label"); names.Add("values"); names.Add("orientation"); names.Add("numberRowsOrCols"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxRadioBoxPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1190,8 +1229,8 @@ bool wxGroupBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxGroupBoxPropertyInfo::GetPropertyNames(wxStringList& names) { - names.Add("label"); wxItemPropertyInfo::GetPropertyNames(names); + names.Add("label"); } bool wxGroupBoxPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1227,9 +1266,9 @@ bool wxCheckBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxCheckBoxPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("label"); names.Add("value"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxCheckBoxPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1266,9 +1305,9 @@ bool wxRadioButtonPropertyInfo::SetProperty(wxString& name, wxProperty *property void wxRadioButtonPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("label"); names.Add("value"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxRadioButtonPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1363,11 +1402,11 @@ bool wxSliderPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxSliderPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("value"); names.Add("orientation"); names.Add("min_value"); names.Add("max_value"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxSliderPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1413,9 +1452,9 @@ bool wxGaugePropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxGaugePropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("value"); names.Add("max_value"); - wxItemPropertyInfo::GetPropertyNames(names); } bool wxGaugePropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1533,12 +1572,12 @@ bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxScrollBarPropertyInfo::GetPropertyNames(wxStringList& names) { + wxItemPropertyInfo::GetPropertyNames(names); names.Add("orientation"); names.Add("value"); names.Add("pageSize"); names.Add("viewLength"); names.Add("objectLength"); - wxItemPropertyInfo::GetPropertyNames(names); // Remove some properties we don't inherit names.Delete("fontPoints"); @@ -1608,6 +1647,21 @@ wxProperty *wxPanelPropertyInfo::GetProperty(wxString& name) else return new wxProperty(name, "Could not get title", "string"); } + else if (name == "caption") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxCAPTION) == wxCAPTION), + "bool"); + } + else if (name == "systemMenu") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxSYSTEM_MENU) == wxSYSTEM_MENU), + "bool"); + } + else if (name == "thickFrame") + { + return new wxProperty(name, ((panelWindow->GetWindowStyleFlag() & wxTHICK_FRAME) == wxTHICK_FRAME), + "bool"); + } else return wxWindowPropertyInfo::GetProperty(name); } @@ -1676,6 +1730,30 @@ bool wxPanelPropertyInfo::SetProperty(wxString& name, wxProperty *property) else return FALSE; } + else if (name == "caption") + { + SetWindowStyle(panelWindow, wxCAPTION, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } + else if (name == "thickFrame") + { + SetWindowStyle(panelWindow, wxTHICK_FRAME, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } + else if (name == "systemMenu") + { + SetWindowStyle(panelWindow, wxSYSTEM_MENU, property->GetValue().BoolValue()); + + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow); + resource->SetStyle(panelWindow->GetWindowStyleFlag()); + return TRUE; + } else return wxWindowPropertyInfo::SetProperty(name, property); } @@ -1687,6 +1765,9 @@ void wxPanelPropertyInfo::GetPropertyNames(wxStringList& names) names.Add("title"); names.Add("no3D"); names.Add("backgroundColour"); + names.Add("caption"); + names.Add("systemMenu"); + names.Add("thickFrame"); } bool wxPanelPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1742,10 +1823,9 @@ bool wxDialogPropertyInfo::SetProperty(wxString& name, wxProperty *property) void wxDialogPropertyInfo::GetPropertyNames(wxStringList& names) { + wxPanelPropertyInfo::GetPropertyNames(names); names.Add("title"); names.Add("modal"); - - wxPanelPropertyInfo::GetPropertyNames(names); } bool wxDialogPropertyInfo::InstantiateResource(wxItemResource *resource) @@ -1884,24 +1964,6 @@ void wxResourceSymbolValidator::OnEdit(wxProperty *property, wxPropertyListView view->UpdatePropertyDisplayInList(property); view->OnPropertyChanged(property); } - -#if 0 - char *s = wxFileSelector( - filenameMessage.GetData(), - wxPathOnly(property->GetValue().StringValue()), - wxFileNameFromPath(property->GetValue().StringValue()), - NULL, - filenameWildCard.GetData(), - 0, - parentWindow); - if (s) - { - property->GetValue() = wxString(s); - view->DisplayProperty(property); - view->UpdatePropertyDisplayInList(property); - view->OnPropertyChanged(property); - } -#endif } BEGIN_EVENT_TABLE(wxResourceSymbolDialog, wxDialog) @@ -1922,7 +1984,7 @@ wxResourceSymbolDialog::wxResourceSymbolDialog(wxWindow* parent, const wxWindowI x += 80; m_nameCtrl = new wxComboBox(this, ID_SYMBOLNAME_COMBOBOX, "", - wxPoint(x, y), wxSize(200, -1), 0, NULL, wxCB_DROPDOWN); + wxPoint(x, y), wxSize(200, -1), 0, NULL, wxCB_DROPDOWN|wxCB_SORT); y += 30; x = 5; @@ -2041,7 +2103,7 @@ bool wxResourceSymbolDialog::CheckValues() void wxResourceSymbolDialog::OnComboBoxSelect(wxCommandEvent& event) { - wxString str(m_nameCtrl->GetValue()); + wxString str(m_nameCtrl->GetStringSelection()); if (wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().IsStandardSymbol(str)) { int id = wxResourceManager::GetCurrentResourceManager()->GetSymbolTable().GetIdForSymbol(str); diff --git a/utils/dialoged/src/winprop.h b/utils/dialoged/src/winprop.h index d8a95cdd37..1cca46cf7b 100644 --- a/utils/dialoged/src/winprop.h +++ b/utils/dialoged/src/winprop.h @@ -20,14 +20,14 @@ class wxPropertyInfo; -class wxDialogEditorPropertyListDialog: public wxPropertyListDialog +class wxDialogEditorPropertyListFrame: public wxPropertyListFrame { friend class wxPropertyInfo; public: - wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, + wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); - ~wxDialogEditorPropertyListDialog(); + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); + ~wxDialogEditorPropertyListFrame(); private: wxPropertySheet* m_propSheet; @@ -57,7 +57,7 @@ class wxResourcePropertyListView: public wxPropertyListView // them with separate classes. class wxPropertyInfo: public wxObject { - friend class wxDialogEditorPropertyListDialog; + friend class wxDialogEditorPropertyListFrame; protected: static wxWindow *sm_propertyWindow; wxPropertyInfo(void) @@ -97,6 +97,9 @@ class wxWindowPropertyInfo: public wxPropertyInfo // Fill in the wxItemResource members to mirror the current window settings virtual bool InstantiateResource(wxItemResource *resource); + + // Set the window style + void SetWindowStyle(wxWindow* win, long style, bool set); }; // For panel items diff --git a/utils/ogl/distrib/zipogl.bat b/utils/ogl/distrib/zipogl.bat index 05c58347cf..37f3e3bf94 100755 --- a/utils/ogl/distrib/zipogl.bat +++ b/utils/ogl/distrib/zipogl.bat @@ -1,17 +1,19 @@ @echo off rem Zip up an external distribution of OGL +set src=d:\wx2\wxWindows\utils\ogl +set dest=%src\deliver -if "%1" == "" goto usage -if "%2" == "" goto usage +if "%src" == "" goto usage +if "%dest" == "" goto usage echo About to archive an external OGL distribution: -echo From %1 -echo To %2\ogl.zip +echo From %src +echo To %dest\ogl.zip echo CTRL-C if this is not correct. inkey /W4 `Press any key to continue...` %%input -erase %2\ogl.zip -cd %1 -zip -P %3 %4 %5 %6 %7 %8 %2\ogl.zip @%1\distrib\ogl.rsp +erase %dest\ogl.zip +cd %src +zip32 -@ %dest\ogl.zip < %src\distrib\ogl.rsp echo OGL archived. goto end diff --git a/utils/wxprop/src/proplist.cpp b/utils/wxprop/src/proplist.cpp index 2b8ba2555b..db2ec2d06a 100644 --- a/utils/wxprop/src/proplist.cpp +++ b/utils/wxprop/src/proplist.cpp @@ -396,7 +396,7 @@ bool wxPropertyListView::CreateControls(void) { wxPanel *panel = (wxPanel *)propertyWindow; - int largeButtonWidth = 50; + int largeButtonWidth = 60; int largeButtonHeight = 25; int smallButtonWidth = 25; @@ -424,11 +424,17 @@ bool wxPropertyListView::CreateControls(void) wxSystemSettings settings; wxFont guiFont = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); +#ifdef __WXMSW__ + wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, "Courier New"); +#else wxFont *boringFont = wxTheFontList->FindOrCreateFont(guiFont.GetPointSize(), wxMODERN, wxNORMAL, wxNORMAL); +#endif // May need to be changed in future to eliminate clashes with app. panel->SetClientData((char *)this); + // These buttons are at the bottom of the window, but create them now + // so the constraints are evaluated in the correct order if (buttonFlags & wxPROP_BUTTON_OK) { windowCloseButton = new wxButton(panel, wxID_OK, "OK", @@ -436,7 +442,7 @@ bool wxPropertyListView::CreateControls(void) windowCloseButton->SetDefault(); windowCloseButton->SetFocus(); } - if (buttonFlags & wxPROP_BUTTON_CLOSE) + else if (buttonFlags & wxPROP_BUTTON_CLOSE) { windowCloseButton = new wxButton(panel, wxID_OK, "Close", wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight)); @@ -455,8 +461,9 @@ bool wxPropertyListView::CreateControls(void) if (windowCloseButton) { wxLayoutConstraints *c1 = new wxLayoutConstraints; + c1->left.SameAs (panel, wxLeft, 2); - c1->top.SameAs (panel, wxTop, 2); + c1->bottom.SameAs (panel, wxBottom, 2); c1->width.AsIs(); c1->height.AsIs(); windowCloseButton->SetConstraints(c1); @@ -465,12 +472,9 @@ bool wxPropertyListView::CreateControls(void) if (windowCancelButton) { wxLayoutConstraints *c2 = new wxLayoutConstraints; - if (leftMostWindow == panel) - c2->left.SameAs (panel, wxLeft, 2); - else - c2->left.RightOf (leftMostWindow, 2); - - c2->top.SameAs (panel, wxTop, 2); + + c2->right.SameAs (panel, wxRight, 2); + c2->bottom.SameAs (panel, wxBottom, 2); c2->width.AsIs(); c2->height.AsIs(); windowCancelButton->SetConstraints(c2); @@ -484,7 +488,7 @@ bool wxPropertyListView::CreateControls(void) else c2->left.RightOf (leftMostWindow, 2); - c2->top.SameAs (panel, wxTop, 2); + c2->bottom.SameAs (panel, wxBottom, 2); c2->width.AsIs(); c2->height.AsIs(); windowHelpButton->SetConstraints(c2); @@ -530,9 +534,11 @@ bool wxPropertyListView::CreateControls(void) wxLayoutConstraints *c = new wxLayoutConstraints; c->left.SameAs (panel, wxLeft, 2); +/* if (windowCloseButton) c->top.Below (windowCloseButton, 2); else +*/ c->top.SameAs (panel, wxTop, 2); c->width.AsIs(); @@ -559,9 +565,11 @@ bool wxPropertyListView::CreateControls(void) editButton->Enable(FALSE); wxLayoutConstraints *c = new wxLayoutConstraints; +/* if (windowCloseButton) c->top.Below (windowCloseButton, 2); else +*/ c->top.SameAs (panel, wxTop, 2); c->right.SameAs (panel, wxRight, 2); @@ -579,10 +587,11 @@ bool wxPropertyListView::CreateControls(void) c->left.RightOf (confirmButton, 2); else c->left.SameAs (panel, wxLeft, 2); - +/* if (windowCloseButton) c->top.Below (windowCloseButton, 2); else +*/ c->top.SameAs (panel, wxTop, 2); if (editButton) @@ -619,10 +628,15 @@ bool wxPropertyListView::CreateControls(void) c->top.Below (valueList, 2); c->right.SameAs (panel, wxRight, 2); - c->bottom.SameAs (panel, wxBottom, 2); + + if (windowCloseButton) + c->bottom.Above (windowCloseButton, -2); + else + c->bottom.SameAs (panel, wxBottom, 2); propertyScrollingList->SetConstraints(c); + // Note: if this is called now, it causes a GPF. // Why? // panel->Layout(); @@ -830,6 +844,10 @@ bool wxPropertyListDialog::ProcessEvent(wxEvent& event) IMPLEMENT_CLASS(wxPropertyListPanel, wxPanel) +BEGIN_EVENT_TABLE(wxPropertyListPanel, wxPanel) + EVT_SIZE(wxPropertyListPanel::OnSize) +END_EVENT_TABLE() + void wxPropertyListPanel::OnDefaultAction(wxControl *item) { /* @@ -847,6 +865,11 @@ bool wxPropertyListPanel::ProcessEvent(wxEvent& event) return TRUE; } +void wxPropertyListPanel::OnSize(wxSizeEvent& event) +{ + Layout(); +} + /* * Property frame */ @@ -856,12 +879,18 @@ IMPLEMENT_CLASS(wxPropertyListFrame, wxFrame) bool wxPropertyListFrame::OnClose(void) { if (view) - return view->OnClose(); + { + if (propertyPanel) + propertyPanel->SetView(NULL); + view->OnClose(); + view = NULL; + return TRUE; + } else return FALSE; } -wxPanel *wxPropertyListFrame::OnCreatePanel(wxFrame *parent, wxPropertyListView *v) +wxPropertyListPanel *wxPropertyListFrame::OnCreatePanel(wxFrame *parent, wxPropertyListView *v) { return new wxPropertyListPanel(v, parent); } diff --git a/utils/wxprop/src/proplist.h b/utils/wxprop/src/proplist.h index 15f1243458..d6dd9ed258 100644 --- a/utils/wxprop/src/proplist.h +++ b/utils/wxprop/src/proplist.h @@ -303,8 +303,16 @@ class wxPropertyListPanel: public wxPanel } void OnDefaultAction(wxControl *item); + inline void SetView(wxPropertyListView* v) { view = v; } + inline wxPropertyListView* GetView() const { return view; } + // Extend event processing to search the view's event table virtual bool ProcessEvent(wxEvent& event); + + // Call Layout() + void OnSize(wxSizeEvent& event); + +DECLARE_EVENT_TABLE() }; /* @@ -316,7 +324,7 @@ class wxPropertyListFrame: public wxFrame DECLARE_CLASS(wxPropertyListFrame) private: wxPropertyListView *view; - wxPanel *propertyPanel; + wxPropertyListPanel *propertyPanel; public: wxPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -330,8 +338,8 @@ class wxPropertyListFrame: public wxFrame // Must call this to create panel and associate view virtual bool Initialize(void); - virtual wxPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); - inline virtual wxPanel *GetPropertyPanel(void) { return propertyPanel; } + virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); + inline virtual wxPropertyListPanel *GetPropertyPanel(void) { return propertyPanel; } }; /* -- 2.45.2