docs/licence.txt
docs/symbols.txt
+src/*.inc
+src/mkdir
+
src/common/*.cpp
src/common/dosyacc.c
src/common/doslex.c
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
samples/bombs/*.cpp
samples/bombs/*.h
samples/bombs/*.def
-samples/bombs/makefile.*
+samples/bombs/makefile*.*
samples/bombs/*.xbm
samples/bombs/*.xpm
samples/bombs/*.txt
samples/ipc/*.cpp
samples/ipc/*.h
samples/ipc/*.def
-samples/ipc/makefile.*
+samples/ipc/makefile*.*
samples/ipc/*.xbm
samples/ipc/*.xpm
samples/ipc/*.ico
samples/types/*.def
samples/types/*.rc
samples/types/*.txt
-samples/types/makefile.*
+samples/types/makefile*.*
samples/types/*.xbm
samples/types/*.xpm
samples/types/*.ico
samples/resource/*.rc
samples/resource/*.txt
samples/resource/*.wxr
-samples/resource/makefile.*
+samples/resource/makefile*.*
samples/resource/*.xbm
samples/resource/*.xpm
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
samples/mdi/*.cpp
samples/mdi/*.h
samples/mdi/*.def
-samples/mdi/makefile.*
+samples/mdi/makefile*.*
samples/mdi/*.xbm
samples/mdi/*.xpm
samples/mdi/*.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
samples/controls/*.cpp
samples/controls/*.h
samples/controls/*.def
-samples/controls/makefile.*
+samples/controls/makefile*.*
samples/controls/*.xbm
samples/controls/*.xpm
samples/controls/*.ico
samples/fractal/*.cpp
samples/fractal/*.h
samples/fractal/*.def
-samples/fractal/makefile.*
+samples/fractal/makefile*.*
samples/fractal/*.xbm
samples/fractal/*.xpm
samples/fractal/*.ico
samples/layout/*.cpp
samples/layout/*.h
samples/layout/*.def
-samples/layout/makefile.*
+samples/layout/makefile*.*
samples/layout/*.xbm
samples/layout/*.xpm
samples/layout/*.ico
samples/printing/*.cpp
samples/printing/*.h
samples/printing/*.def
-samples/printing/makefile.*
+samples/printing/makefile*.*
samples/printing/*.xbm
samples/printing/*.xpm
samples/printing/*.txt
samples/toolbar/*.cpp
samples/toolbar/*.h
samples/toolbar/*.def
-samples/toolbar/makefile.*
+samples/toolbar/makefile*.*
samples/toolbar/*.txt
samples/toolbar/*.xbm
samples/toolbar/*.xpm
samples/docview/*.cpp
samples/docview/*.def
samples/docview/*.rc
-samples/docview/makefile.*
+samples/docview/makefile*.*
samples/docview/*.xbm
samples/docview/*.xpm
samples/docview/*.txt
samples/memcheck/*.cpp
samples/memcheck/*.def
samples/memcheck/*.rc
-samples/memcheck/makefile.*
+samples/memcheck/makefile*.*
samples/memcheck/*.xbm
samples/memcheck/*.xpm
samples/memcheck/*.txt
samples/odbc/*.cpp
samples/odbc/*.def
samples/odbc/*.rc
-samples/odbc/makefile.*
+samples/odbc/makefile*.*
samples/odbc/*.inf
samples/odbc/*.xbm
samples/odbc/*.xpm
samples/dialogs/*.cpp
samples/dialogs/*.def
samples/dialogs/*.rc
-samples/dialogs/makefile.*
+samples/dialogs/makefile*.*
samples/dialogs/*.xbm
samples/dialogs/*.xpm
samples/dialogs/*.txt
samples/wxpoem/*.rc
samples/wxpoem/*.inf
samples/wxpoem/*.txt
-samples/wxpoem/makefile.*
+samples/wxpoem/makefile*.*
samples/wxpoem/*.xbm
samples/wxpoem/*.xpm
samples/wxpoem/*.ico
samples/pressup/*.rc
samples/pressup/*.inf
samples/pressup/*.txt
-samples/pressup/makefile.*
+samples/pressup/makefile*.*
samples/pressup/*.xbm
samples/pressup/*.xpm
samples/pressup/*.ico
samples/validate/*.rc
samples/validate/*.inf
samples/validate/*.txt
-samples/validate/makefile.*
+samples/validate/makefile*.*
samples/validate/*.xbm
samples/validate/*.xpm
samples/validate/*.ico
samples/events/*.rc
samples/events/*.inf
samples/events/*.txt
-samples/events/makefile.*
+samples/events/makefile*.*
samples/events/*.xbm
samples/events/*.xpm
samples/events/*.ico
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
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
samples/splitter/*.def
samples/splitter/*.rc
samples/splitter/*.txt
-samples/splitter/makefile.*
+samples/splitter/makefile*.*
samples/splitter/*.xbm
samples/splitter/*.xpm
samples/splitter/*.ico
samples/grid/*.def
samples/grid/*.rc
samples/grid/*.txt
-samples/grid/makefile.*
+samples/grid/makefile*.*
samples/grid/*.xbm
samples/grid/*.xpm
samples/grid/*.ico
samples/internat/*.def
samples/internat/*.rc
samples/internat/*.txt
-samples/internat/makefile.*
+samples/internat/makefile*.*
samples/internat/*.xbm
samples/internat/*.xpm
samples/internat/*.po
samples/checklst/*.def
samples/checklst/*.rc
samples/checklst/*.txt
-samples/checklst/makefile.*
+samples/checklst/makefile*.*
samples/checklst/*.xbm
samples/checklst/*.xpm
samples/checklst/*.ico
samples/dnd/*.cpp
samples/dnd/*.h
-samples/dnd/makefile.*
+samples/dnd/makefile*.*
samples/dnd/*.rc
samples/dnd/*.def
samples/dnd/*.bmp
samples/tab/*.cpp
samples/tab/*.h
-samples/tab/makefile.*
+samples/tab/makefile*.*
samples/tab/*.rc
samples/tab/*.def
samples/tab/*.bmp
samples/png/*.cpp
samples/png/*.h
-samples/png/makefile.*
+samples/png/makefile*.*
samples/png/*.rc
samples/png/*.def
samples/png/*.bmp
src/mkdirs
src/Makefile
src/Makefile.in
+src/*.inc
src/gtk/*.cpp
src/gtk/*.c
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/*
@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
\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}
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}}
// 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"
#endif
#endif
- // __APPH__
+ // _WX_APP_H_
// 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"
};
#endif
- // __BITMAPH__
+ // _WX_BITMAP_H_
// 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"
};
#endif
- // __BMPBUTTNH__
+ // _WX_BMPBUTTN_H_
// 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"
};
#endif
- // __BRUSHH__
+ // _WX_BRUSH_H_
// 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"
};
#endif
- // __BUTTONH__
+ // _WX_BUTTON_H_
// 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"
virtual void SetLabel(const wxBitmap *bitmap);
};
#endif
- // __CHECKBOXH__
+ // _WX_CHECKBOX_H_
// Created: 16.11.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifndef __CHECKLST_H__
-#define __CHECKLST_H__
+#ifndef __CHECKLST__H_
+#define __CHECKLST__H_
#ifdef __GNUG__
#pragma interface "checklst.h"
// 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"
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,
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);
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+
+protected:
+ int m_noStrings;
+
};
#endif
- // __CHOICEH__
+ // _WX_CHOICE_H_
// 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"
#endif // USE_CLIPBOARD
#endif
- // __CLIPBRDH__
+ // _WX_CLIPBRD_H_
// 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"
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_
// 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"
#define wxColor wxColour
#endif
- // __COLOURH__
+ // _WX_COLOUR_H_
// 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"
#endif // USE_COMBOBOX
#endif
- // __COMBOBOXH__
+ // _WX_COMBOBOX_H_
// 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"
#endif
#endif
- // __CONTROLH__
+ // _WX_CONTROL_H_
// 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,
// 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"
};
#endif
- // __CURSORH__
+ // _WX_CURSOR_H_
// 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"
#endif
- // __DCH__
+ // _WX_DC_H_
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifndef __DCCLIENTH__
-#define __DCCLIENTH__
+#ifndef _WX_DCCLIENT_H_
+#define _WX_DCCLIENT_H_
#ifdef __GNUG__
#pragma interface "dcclient.h"
};
#endif
- // __DCCLIENTH__
+ // _WX_DCCLIENT_H_
// 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"
};
#endif
- // __DCMEMORYH__
+ // _WX_DCMEMORY_H_
// 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"
WXHDC WXDLLEXPORT wxGetPrinterDC(int orientation);
#endif
- // __DCPRINTH__
+ // _WX_DCPRINT_H_
// 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"
};
#endif
- // __DCSCREENH__
+ // _WX_DCSCREEN_H_
// 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"
#endif
#endif
- // __DDEH__
+ // _WX_DDE_H_
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifndef __DIALOGH__
-#define __DIALOGH__
+#ifndef _WX_DIALOG_H_
+#define _WX_DIALOG_H_
#ifdef __GNUG__
#pragma interface "dialog.h"
};
#endif
- // __DIALOGH__
+ // _WX_DIALOG_H_
// 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
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Microsoft, Julian Smart
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/***************************************************************************
// 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"
};
#endif
- // __DIRDLGH__
+ // _WX_DIRDLG_H_
// 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"
char* WXDLLEXPORT wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, wxWindow *parent = NULL);
#endif
- // __FILEDLGH__
+ // _WX_FILEDLG_H_
// 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"
};
#endif
- // __FONTH__
+ // _WX_FONT_H_
// 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"
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_
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifndef __FRAMEH__
-#define __FRAMEH__
+#ifndef _WX_FRAME_H_
+#define _WX_FRAME_H_
#ifdef __GNUG__
#pragma interface "frame.h"
};
#endif
- // __FRAMEH__
+ // _WX_FRAME_H_
// 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"
#endif
#endif
- // __GAUGEH__
+ // _WX_GAUGE_H_
// 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_
// 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_
// 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"
};
#endif
- // __GDIOBJH__
+ // _WX_GDIOBJ_H_
// 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"
#endif // USE_HELP
#endif
- // __HELPWINH__
+ // _WX_HELPWIN_H_
// 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"
};
#endif
- // __ICONH__
+ // _WX_ICON_H_
// 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"
};
#endif
- // __IMAGLISTH__
+ // _WX_IMAGLIST_H_
// Created: 27.07.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _INICONF_H
// 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"
};
#endif
- // __JOYSTICKH__
+ // _WX_JOYSTICK_H_
// 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"
#include "wx/control.h"
-WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
#if USE_OWNER_DRAWN
};
#endif
- // __LISTBOXH__
+ // _WX_LISTBOX_H_
// 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"
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 ;
// 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) ;
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)
#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
#endif
- // __LISTCTRLH__
+ // _WX_LISTCTRL_H_
// 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"
};
#endif
- // __MDIH__
+ // _WX_MDI_H_
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifndef __MENUH__
-#define __MENUH__
+#ifndef _WX_MENU_H_
+#define _WX_MENU_H_
#ifdef __GNUG__
#pragma interface "menu.h"
#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;
// ----------------------------------------------------------------------------
// Menu Bar (a la Windows)
// ----------------------------------------------------------------------------
-class wxFrame;
+class WXDLLEXPORT wxFrame;
class WXDLLEXPORT wxMenuBar: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxMenuBar)
WXHMENU m_hMenu;
};
-#endif // __MENUH__
+#endif // _WX_MENU_H_
// 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"
#endif // USE_METAFILE
#endif
- // __METAFIILEH__
+ // _WX_METAFIILE_H_
// 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"
};
#endif
- // __MINIFRAMH__
+ // _WX_MINIFRAM_H_
// 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"
wxWindow *parent = NULL, int x = -1, int y = -1);
#endif
- // __MSGBOXDLGH__
+ // _WX_MSGBOXDLG_H_
// Created: 10.05.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifndef _OLEDATAOBJ_H
-#define _OLEDATAOBJ_H
+#ifndef _WX_OLEDATAOBJ_H
+#define _WX_OLEDATAOBJ_H
// ----------------------------------------------------------------------------
// forward declarations
// @@@ TODO: wx{Bitmap|Metafile|...}DataObject
// ----------------------------------------------------------------------------
-#endif //_OLEDATAOBJ_H
+#endif //_WX_OLEDATAOBJ_H
// Created: 06.03.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifndef _OLEDROPSRC_H
-#define _OLEDROPSRC_H
+#ifndef _WX_OLEDROPSRC_H
+#define _WX_OLEDROPSRC_H
#ifdef __GNUG__
#pragma interface
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
// Created: 06.03.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// 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"
};
// ============================================================================
-#endif //_OLEDROPTGT_H
+#endif //_WX_OLEDROPTGT_H
// Created: 19.02.1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// 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"
#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
// Created: 11.07.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// 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"
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
// 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"
#define wxColourMap wxPalette
#endif
- // __PALETTEH__
+ // _WX_PALETTE_H_
// 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"
int wx2msPenStyle(int wx_style);
#endif
- // __PENH__
+ // _WX_PEN_H_
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Microsoft, Julian Smart
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
*
*/
-#ifndef __PNGREAD__
-#define __PNGREAD__
+#ifndef _WX_PNGREAD__
+#define _WX_PNGREAD__
#ifdef __GNUG__
#pragma interface "pngread.h"
// 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"
};
#endif
- // __PRINTDLGH__
+ // _WX_PRINTDLG_H_
// 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"
};
#endif
- // __PRINTWINH__
+ // _WX_PRINTWIN_H_
// 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"
#endif
#endif
- // __PRIVATEH__
+ // _WX_PRIVATE_H_
// 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"
};
#endif
- // __RADIOBOXH__
+ // _WX_RADIOBOX_H_
// 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"
#endif
#endif
- // __RADIOBUTH__
+ // _WX_RADIOBUT_H_
// Created: 27.04.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _REGCONF_H
// 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"
};
#endif
- // __REGIONH__
+ // _WX_REGION_H_
// Created: 03.04.198
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _REGISTRY_H
// 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"
};
#endif
- // __SCROLBARH__
+ // _WX_SCROLBAR_H_
// 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"
};
#endif
- // __SETTINGSH__
+ // _WX_SETTINGS_H_
// 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
#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
#endif
#endif
- // __SETUPH__
+ // _WX_SETUP_H_
// 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_
// 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_
// 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_
// 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"
{ wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxSpinEventFunction) & func },
#endif
- // __WIN95__
+ // _WX_WIN95__
#endif
- // __SPINBUTTH__
+ // _WX_SPINBUTT_H_
// 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"
};
#endif
- // __STATBMPH__
+ // _WX_STATBMP_H_
// 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"
};
#endif
- // __STATBOXH__
+ // _WX_STATBOX_H_
// Created: 04.04.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _STATBR95_H
// 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"
};
#endif
- // __STATTEXTH__
+ // _WX_STATTEXT_H_
// 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"
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
#endif
- // __TABCTRLH__
+ // _WX_TABCTRL_H_
// 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"
#endif // USE_TOOL/BUTTONBAR
#endif
- // __TBAR95H__
+ // _WX_TBAR95_H_
// 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"
#endif // USE_TOOL/BUTTONBAR
#endif
- // __TBARMSWH__
+ // _WX_TBARMSW_H_
// 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"
};
#endif
- // __TEXTCTRLH__
+ // _WX_TEXTCTRL_H_
// 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"
long WXDLLEXPORT wxGetCurrentTime(void);
#endif
- // __TIMERH_
+ // _WX_TIMERH_
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifndef __TREECTRLH__
-#define __TREECTRLH__
+#ifndef _WX_TREECTRL_H_
+#define _WX_TREECTRL_H_
#ifdef __GNUG__
#pragma interface "treectrl.h"
// bounding rect
bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const;
//
- wxTextCtrl& GetEditControl() const;
+ wxTextCtrl* GetEditControl() const;
// operations
// ----------
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);
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)
};
#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#endif
- // __TREECTRLH__
+ // _WX_TREECTRL_H_
// 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"
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __WINDOWH__
-#define __WINDOWH__
+#ifndef _WX_WINDOW_H_
+#define _WX_WINDOW_H_
#ifdef __GNUG__
#pragma interface "window.h"
{
DECLARE_ABSTRACT_CLASS(wxWindow)
- friend class wxUpdateIterator;
friend class wxDC;
friend class wxPaintDC;
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;
// 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);
int WXDLLEXPORT NewControlId(void);
#endif
- // __WINDOWH__
+ // _WX_WINDOW_H_
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);
/* 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 },
/* wxToolBar */
{ "wxTB_3DBUTTONS", wxTB_3DBUTTONS},
+ { "wxTB_HORIZONTAL", wxTB_HORIZONTAL},
+ { "wxTB_VERTICAL", wxTB_VERTICAL},
+ { "wxTB_FLAT", wxTB_FLAT},
/* Generic */
{ "wxVSCROLL", wxVSCROLL },
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
{
#endif
// use debug CRT functions for memory leak detections in VC++
+/* THIS CRAPS OUT in VC++ 5.
#if defined(__WXDEBUG__) && defined(_MSC_VER)
#include <crtdbg.h>
#endif
+*/
extern char *wxBuffer;
extern char *wxOsVersion;
{
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
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
- no_strings = n;
+ m_noStrings = n;
m_windowStyle = style;
{
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;
}
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());
// 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...
wxColourDialog::wxColourDialog(void)
{
- dialogParent = NULL;
+ m_dialogParent = NULL;
}
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;
}
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
// 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;
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
SetForegroundColour(parent->GetDefaultForegroundColour()) ;
- no_strings = n;
+ m_noStrings = n;
m_windowStyle = style;
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)
wxFontDialog::wxFontDialog(void)
{
- dialogParent = NULL;
+ m_dialogParent = NULL;
}
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;
}
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;
}
// 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;
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,
m_imageListNormal = NULL;
m_imageListSmall = NULL;
m_imageListState = NULL;
+ m_textCtrl = NULL;
m_colCount = 0;
wxSystemSettings settings;
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
}
// 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
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)
{
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);
}
(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);
}
{
m_imageListNormal = NULL;
m_imageListState = NULL;
+ m_textCtrl = NULL;
}
bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
m_imageListNormal = NULL;
m_imageListState = NULL;
+ m_textCtrl = NULL;
int x = pos.x;
int y = pos.y;
wxTreeCtrl::~wxTreeCtrl(void)
{
- m_textCtrl.SetHWND((WXHWND) NULL);
+ if (m_textCtrl)
+ {
+ m_textCtrl->UnsubclassWin();
+ m_textCtrl->SetHWND((WXHWND) 0);
+ delete m_textCtrl;
+ }
}
// Attributes
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
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)
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);
}
!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) @&&!
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
$(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)
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
$(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
m_optionsResourceFilename = buf;
#elif defined(__X__)
char buf[500];
- ()wxGetHomeDir(buf);
+ wxGetHomeDir(buf);
strcat(buf, "/.dialogedrc");
m_optionsResourceFilename = buf;
#else
InstantiateAllResourcesFromWindows();
if (m_resourceTable.Save(filename))
{
+ m_symbolTable.WriteIncludeFile(m_symbolFilename);
Modify(FALSE);
return TRUE;
}
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;
}
{
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;
// 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
{
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);
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
}
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);
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;
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)
{
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)
{
}
}
+// 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.
#include "proplist.h"
#include "symbtabl.h"
+#include "winstyle.h"
#define RESED_DELETE 1
#define RESED_RECREATE 3
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);
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;
// 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.
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())
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())
}
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())
}
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())
}
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();
}
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();
}
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())
}
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();
}
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();
}
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();
}
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() << ", ";
}
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();
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 << ", [";
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();
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");
}
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)
{
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();
* wxDialogEditorPropertyListDialog
*/
+ /*
wxDialogEditorPropertyListDialog::wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name):
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
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;
}
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
void wxButtonPropertyInfo::GetPropertyNames(wxStringList& names)
{
- names.Add("label");
wxItemPropertyInfo::GetPropertyNames(names);
+ names.Add("label");
}
bool wxButtonPropertyInfo::InstantiateResource(wxItemResource *resource)
void wxStaticTextPropertyInfo::GetPropertyNames(wxStringList& names)
{
- names.Add("label");
wxItemPropertyInfo::GetPropertyNames(names);
+ names.Add("label");
}
bool wxStaticTextPropertyInfo::InstantiateResource(wxItemResource *resource)
void wxStaticBitmapPropertyInfo::GetPropertyNames(wxStringList& names)
{
- names.Add("label");
wxItemPropertyInfo::GetPropertyNames(names);
+ names.Add("label");
}
bool wxStaticBitmapPropertyInfo::InstantiateResource(wxItemResource *resource)
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)
void wxListBoxPropertyInfo::GetPropertyNames(wxStringList& names)
{
+ wxItemPropertyInfo::GetPropertyNames(names);
names.Add("values");
names.Add("multiple");
- wxItemPropertyInfo::GetPropertyNames(names);
}
bool wxListBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
void wxChoicePropertyInfo::GetPropertyNames(wxStringList& names)
{
- names.Add("values");
wxItemPropertyInfo::GetPropertyNames(names);
+ names.Add("values");
}
bool wxChoicePropertyInfo::InstantiateResource(wxItemResource *resource)
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)
void wxGroupBoxPropertyInfo::GetPropertyNames(wxStringList& names)
{
- names.Add("label");
wxItemPropertyInfo::GetPropertyNames(names);
+ names.Add("label");
}
bool wxGroupBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
void wxCheckBoxPropertyInfo::GetPropertyNames(wxStringList& names)
{
+ wxItemPropertyInfo::GetPropertyNames(names);
names.Add("label");
names.Add("value");
- wxItemPropertyInfo::GetPropertyNames(names);
}
bool wxCheckBoxPropertyInfo::InstantiateResource(wxItemResource *resource)
void wxRadioButtonPropertyInfo::GetPropertyNames(wxStringList& names)
{
+ wxItemPropertyInfo::GetPropertyNames(names);
names.Add("label");
names.Add("value");
- wxItemPropertyInfo::GetPropertyNames(names);
}
bool wxRadioButtonPropertyInfo::InstantiateResource(wxItemResource *resource)
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)
void wxGaugePropertyInfo::GetPropertyNames(wxStringList& names)
{
+ wxItemPropertyInfo::GetPropertyNames(names);
names.Add("value");
names.Add("max_value");
- wxItemPropertyInfo::GetPropertyNames(names);
}
bool wxGaugePropertyInfo::InstantiateResource(wxItemResource *resource)
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");
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);
}
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);
}
names.Add("title");
names.Add("no3D");
names.Add("backgroundColour");
+ names.Add("caption");
+ names.Add("systemMenu");
+ names.Add("thickFrame");
}
bool wxPanelPropertyInfo::InstantiateResource(wxItemResource *resource)
void wxDialogPropertyInfo::GetPropertyNames(wxStringList& names)
{
+ wxPanelPropertyInfo::GetPropertyNames(names);
names.Add("title");
names.Add("modal");
-
- wxPanelPropertyInfo::GetPropertyNames(names);
}
bool wxDialogPropertyInfo::InstantiateResource(wxItemResource *resource)
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)
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;
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);
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;
// them with separate classes.
class wxPropertyInfo: public wxObject
{
- friend class wxDialogEditorPropertyListDialog;
+ friend class wxDialogEditorPropertyListFrame;
protected:
static wxWindow *sm_propertyWindow;
wxPropertyInfo(void)
// 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
@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
{
wxPanel *panel = (wxPanel *)propertyWindow;
- int largeButtonWidth = 50;
+ int largeButtonWidth = 60;
int largeButtonHeight = 25;
int smallButtonWidth = 25;
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",
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));
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);
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);
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);
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();
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);
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)
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();
IMPLEMENT_CLASS(wxPropertyListPanel, wxPanel)
+BEGIN_EVENT_TABLE(wxPropertyListPanel, wxPanel)
+ EVT_SIZE(wxPropertyListPanel::OnSize)
+END_EVENT_TABLE()
+
void wxPropertyListPanel::OnDefaultAction(wxControl *item)
{
/*
return TRUE;
}
+void wxPropertyListPanel::OnSize(wxSizeEvent& event)
+{
+ Layout();
+}
+
/*
* Property frame
*/
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);
}
}
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()
};
/*
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,
// 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; }
};
/*