dialog behaviour; added dummy menubar constructors; corrected wxMSW wxRegion bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1684
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
29 files changed:
wxGTK.spec
distrib/gtk/copy_src
wxGTK.spec
distrib/gtk/copy_src
+distrib/gtk/README.txt
+distrib/gtk/Setup
docs/gtk/*.html
docs/gtk/*.txt
docs/gtk/*.html
docs/gtk/*.txt
- Can't set the colours for the buttons in the file selector, for
some reason.
- Can't set the colours for the buttons in the file selector, for
some reason.
+- On SGI IRIX 6.4, XtDestroyWidget in ~wxWindow causes a crash in
+ some cicumstances. This is being looked into. Meanwhile, a
+ possible workaround is to remove the final XtDestroyWidget line in ~wxWindow
+ (window.cpp). This will mean that child windows will only get
+ destroyed when frames and dialogs are destroyed, so dynamic subwindow
+ deletion may not work properly.
+
+- There are reports that scrolling can cause crashes under Lesstif.
+ This is probably a Lesstif bug.
+
+- Dialog Editor could be more user-friendly. Controls are hard to
+ size and position accurately. No way of changing tab order
+ except by editing .wxr file.
+
- Makefiles for more compilers and samples; Cygwin makefiles
rationalised.
- Makefiles for more compilers and samples; Cygwin makefiles
rationalised.
-- Added VC++ project file for compiling as DLL.
+- Added VC++ project file for compiling wxWindows as DLL.
\input strlist.tex
\input strmbase.tex
\input stream.tex
\input strlist.tex
\input strmbase.tex
\input stream.tex
\input sysclevt.tex
\input settings.tex
\input tab.tex
\input sysclevt.tex
\input settings.tex
\input tab.tex
stream but it can be placed on the top of another stream. So, for example, it
can uncompress, uncrypt the datas which are read from another stream and pass it
to the requester.
stream but it can be placed on the top of another stream. So, for example, it
can uncompress, uncrypt the datas which are read from another stream and pass it
to the requester.
stream but it can be placed on the top of another stream. So, for example, it
can compress, crypt the datas which are passed to it and write them to another
stream.
stream but it can be placed on the top of another stream. So, for example, it
can compress, crypt the datas which are passed to it and write them to another
stream.
\func{void}{SetPassword}{\param{const wxString\&}{ user}}
Sets the authentication password. It is mainly useful when FTP is used.
\func{void}{SetPassword}{\param{const wxString\&}{ user}}
Sets the authentication password. It is mainly useful when FTP is used.
\section{Validator overview}\label{validatoroverview}
\section{Validator overview}\label{validatoroverview}
-Classes: \helpref{wxValidator}{wxvalidator}, \helpref{wxTextValidator}{wxtextvalidator}
+Classes: \helpref{wxValidator}{wxvalidator}, \helpref{wxTextValidator}{wxtextvalidator},
+\helpref{wxGenericValidator}{wxgenericvalidator}
The aim of the validator concept is to make dialogs very much easier to write.
A validator is an object that can be plugged into a control (such as a wxTextCtrl), and
The aim of the validator concept is to make dialogs very much easier to write.
A validator is an object that can be plugged into a control (such as a wxTextCtrl), and
and validating it. It also is able to intercept events generated
by the control, providing filtering behaviour without the need to derive a new control class.
and validating it. It also is able to intercept events generated
by the control, providing filtering behaviour without the need to derive a new control class.
-You can use a stock validator, such as \helpref{wxTextValidator}{wxtextvalidator}; or
-you can write your own.
+You can use a stock validator, such as \helpref{wxTextValidator}{wxtextvalidator} (which does text
+control data transfer, validation and filtering) and
+\helpref{wxGenericValidator}{wxgenericvalidator} (which does data transfer for a range of controls);
+or you can write your own.
So if using validators and a normal OK button, you may not even need to write any
code for handling dialog dismissal.
So if using validators and a normal OK button, you may not even need to write any
code for handling dialog dismissal.
+If you load your dialog from a resource file, you'll need to iterate through the controls
+setting validators, since validators can't be specified in a dialog resource.
+
functions, try putting the gcc fixinclude file paths early in the
include path.
functions, try putting the gcc fixinclude file paths early in the
include path.
+- If you get strange memory problems (for example in deletion
+ of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS to 0 in
+ setup.h, and recompile.
+
+- Problems with XtDestroyWidget crashing in ~wxWindow have been
+ reported on SGI IRIX 6.4. This has not yet been resolved, so
+ any advice here would be very welcome. See bugs.txt for a
+ possible temporary workaround.
+
wxwin-users@wx.dent.med.uni-muenchen.de
wxwin-users@wx.dent.med.uni-muenchen.de
-
-Julian Smart, January 1999.
+Julian Smart, February 1999.
julian.smart@ukonline.co.uk
julian.smart@ukonline.co.uk
1. Unarchive wx200vc.zip, the VC++ 5 project makefiles.
2. Open src/wxvc.dsp, set Debug or Release configuration, and
1. Unarchive wx200vc.zip, the VC++ 5 project makefiles.
2. Open src/wxvc.dsp, set Debug or Release configuration, and
- compile. This will produce lib/wxvc.lib or lib/wxvc_debug.lib.
+ compile. This will produce src/Debug/wxvc.lib or
+ src/Release/wxvc.lib. The project file src/wxvc_dll.dsp
+ will make a DLL version of wxWindow, which will go in
+ src/DebugDLL/wxvc.[lib,dll] and src/ReleaseDLL/wxvc.[lib,dll].
3. Open a sample project file, choose a configuration, and compile.
The project files don't use precompiled headers, to save
space, but you can switch PCH compiling on for greater speed.
3. Open a sample project file, choose a configuration, and compile.
The project files don't use precompiled headers, to save
space, but you can switch PCH compiling on for greater speed.
Watcom C++ 10.6 compilation
---------------------------
Watcom C++ 10.6 compilation
---------------------------
-1. Make sure your WXWIN variable is set, and uses the FAT (short
- name) form.
+1. Make sure your WXWIN variable is set, and uses the DOS short
+ name form.
2. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
make the wxWindows core library.
3. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
2. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
make the wxWindows core library.
3. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
NOTES:
(a) Unfortunately CodeWarrior support is broken in this
NOTES:
(a) Unfortunately CodeWarrior support is broken in this
-release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
+ release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
(b) You need CodeWarrior Pro 4 plus the patches to 4.1 from the
(b) You need CodeWarrior Pro 4 plus the patches to 4.1 from the
Symantec C++ compilation
------------------------
Symantec C++ compilation
------------------------
> cd c:\wx\samples\minimal
> make -f makefile.g95
> cd c:\wx\samples\minimal
> make -f makefile.g95
+ Ignore the warning about the default entry point.
+
- Use the 'strip' command to reduce executable size.
- With Cygnus Cygwin, you can invoke gdb --nw myfile.exe to
- Use the 'strip' command to reduce executable size.
- With Cygnus Cygwin, you can invoke gdb --nw myfile.exe to
-The wxGTK Web site (with further wxGTK-specific fiels and
+The wxGTK Web site (with further wxGTK-specific files and
information) is located at:
http://www.freiburg.linux.de/~wxxt
information) is located at:
http://www.freiburg.linux.de/~wxxt
-The wxWindows Team, January 1999
+The wxWindows Team, February 1999
wxBitmap(char **data, wxControl* control = NULL);
// Load a file or resource
wxBitmap(char **data, wxControl* control = NULL);
// Load a file or resource
- wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XBM);
+ wxBitmap(const wxString& name, long type = wxBITMAP_TYPE_XPM);
// Constructor for generalised creation from data
wxBitmap(void *data, long type, int width, int height, int depth = 1);
// Constructor for generalised creation from data
wxBitmap(void *data, long type, int width, int height, int depth = 1);
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
virtual bool Create(int width, int height, int depth = -1);
virtual bool Create(void *data, long type, int width, int height, int depth = 1);
- virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM);
+ virtual bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XPM);
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
virtual bool SaveFile(const wxString& name, int type, const wxPalette *cmap = NULL);
inline bool Ok() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); }
// Initialize with XPM data
wxIcon(char **data);
// Initialize with XPM data
wxIcon(char **data);
- wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
+ wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
- bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_ICO_RESOURCE,
+ bool LoadFile(const wxString& name, long flags = wxBITMAP_TYPE_XPM,
int desiredWidth = -1, int desiredHeight = -1);
int desiredWidth = -1, int desiredHeight = -1);
- bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM)
- { return wxBitmap::LoadFile(name, type); }
+// bool LoadFile(const wxString& name, long type = wxBITMAP_TYPE_XBM)
+// { return wxBitmap::LoadFile(name, type); }
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
{
DECLARE_DYNAMIC_CLASS(wxMenuBar)
{
DECLARE_DYNAMIC_CLASS(wxMenuBar)
+ wxMenuBar( long style );
wxMenuBar();
wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
~wxMenuBar();
wxMenuBar();
wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
~wxMenuBar();
+ wxMenuBar( long style );
wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
~wxMenuBar();
wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
~wxMenuBar();
{
DECLARE_DYNAMIC_CLASS(wxPropertySheet)
public:
{
DECLARE_DYNAMIC_CLASS(wxPropertySheet)
public:
- wxPropertySheet(wxString name = "");
+ wxPropertySheet(const wxString& name = "");
~wxPropertySheet(void);
// Set the name of the sheet
~wxPropertySheet(void);
// Set the name of the sheet
- inline virtual void SetName(wxString name) { m_name=name; }
- inline virtual wxString GetName() { return m_name; }
+ inline virtual void SetName(const wxString& name) { m_name=name; }
+ inline virtual wxString GetName() const { return m_name; }
// Does this sheet contain a property with this name
// Does this sheet contain a property with this name
- virtual bool HasProperty(wxString name);
+ virtual bool HasProperty(const wxString& name) const;
// Set property name to value
// Set property name to value
- virtual bool SetProperty(const wxString name, wxPropertyValue value);
+ virtual bool SetProperty(const wxString& name, const wxPropertyValue& value);
// Remove property from sheet by name, deleting it
// Remove property from sheet by name, deleting it
- virtual void RemoveProperty(wxString name);
+ virtual void RemoveProperty(const wxString& name);
// Get the name of the sheet
// Add a property
virtual void AddProperty(wxProperty *property);
// Get property by name
// Get the name of the sheet
// Add a property
virtual void AddProperty(wxProperty *property);
// Get property by name
- virtual wxProperty *GetProperty(wxString name);
+ virtual wxProperty *GetProperty(const wxString& name) const;
// Clear all properties
virtual void Clear(void);
// Clear all properties
virtual void Clear(void);
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
#endif
SetBackgroundColour(FortyApp::BackgroundColour());
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
#endif
SetBackgroundColour(FortyApp::BackgroundColour());
- AllowDoubleClick(TRUE);
m_handCursor = new wxCursor(wxCURSOR_HAND);
m_arrowCursor = new wxCursor(wxCURSOR_ARROW);
m_handCursor = new wxCursor(wxCURSOR_HAND);
m_arrowCursor = new wxCursor(wxCURSOR_ARROW);
// then ask the player for their name
if (m_player.Length() == 0 && !m_playerDialog)
{
// then ask the player for their name
if (m_player.Length() == 0 && !m_playerDialog)
{
- m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
+ m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
m_playerDialog->ShowModal();
m_player = m_playerDialog->GetPlayersName();
if (m_player.Length() > 0)
m_playerDialog->ShowModal();
m_player = m_playerDialog->GetPlayersName();
if (m_player.Length() > 0)
m_scoreFile->ReadPlayersScore(m_player, wins, games, score);
m_game->NewPlayer(wins, games, score);
m_game->DisplayScore(dc);
m_scoreFile->ReadPlayersScore(m_player, wins, games, score);
m_game->NewPlayer(wins, games, score);
m_game->DisplayScore(dc);
+ m_playerDialog->Destroy();
m_playerDialog = 0;
Refresh();
}
m_playerDialog = 0;
Refresh();
}
#include "forty.h"
#include "card.h"
#include "forty.h"
#include "card.h"
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "pictures.xpm"
#include "symbols.xbm"
#endif
#include "pictures.xpm"
#include "symbols.xbm"
#endif
frame->Show(TRUE);
return TRUE;
frame->Show(TRUE);
return TRUE;
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
- if (m_canvas->OnCloseCanvas())
+ if (m_canvas->OnCloseCanvas() )
- wxMessageBox("Please enter your name", "Forty Thieves");
+ wxMessageBox("Please enter your name", "Forty Thieves");
}
}
else
{
m_player = "";
}
}
else
{
m_player = "";
# "%W% %G%"
#
# Makefile : Builds samples for Win95, BC++ WIN32
# "%W% %G%"
#
# Makefile : Builds samples for Win95, BC++ WIN32
-# Use FINAL=1 argument to nmake to build final version with no debugging
+# Use FINAL=1 argument to make to build final version with no debugging
# info
# Set WXDIR for your system
# info
# Set WXDIR for your system
-!include $(WXDIR)\src\makevc.env
-
all:
cd $(WXDIR)\samples\splitter
all:
cd $(WXDIR)\samples\splitter
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\resource
cd $(WXDIR)\samples\resource
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\controls
cd $(WXDIR)\samples\controls
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\listctrl
cd $(WXDIR)\samples\listctrl
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\treectrl
cd $(WXDIR)\samples\treectrl
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\validate
cd $(WXDIR)\samples\validate
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\minimal
cd $(WXDIR)\samples\minimal
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\layout
cd $(WXDIR)\samples\layout
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\printing
cd $(WXDIR)\samples\printing
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\toolbar
cd $(WXDIR)\samples\toolbar
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\dialogs
cd $(WXDIR)\samples\dialogs
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\docview
cd $(WXDIR)\samples\docview
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\docvwmdi
cd $(WXDIR)\samples\docvwmdi
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\controls
cd $(WXDIR)\samples\controls
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\nativdlg
cd $(WXDIR)\samples\nativdlg
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\internat
cd $(WXDIR)\samples\internat
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\joytest
cd $(WXDIR)\samples\joytest
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\taskbar
cd $(WXDIR)\samples\taskbar
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\sashtest
cd $(WXDIR)\samples\sashtest
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
!if "$(FINAL)" == "0"
cd $(WXDIR)\samples\memcheck
!endif
!if "$(FINAL)" == "0"
cd $(WXDIR)\samples\memcheck
!endif
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\ownerdrw
cd $(WXDIR)\samples\ownerdrw
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\checklst
cd $(WXDIR)\samples\checklst
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\minifram
cd $(WXDIR)\samples\minifram
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\bombs
cd $(WXDIR)\samples\bombs
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\fractal
cd $(WXDIR)\samples\fractal
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\wxpoem
cd $(WXDIR)\samples\wxpoem
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\typetest
cd $(WXDIR)\samples\typetest
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\proplist
cd $(WXDIR)\samples\proplist
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
cd $(WXDIR)\samples\image
cd $(WXDIR)\samples\image
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
- nmake -f makefile.b32 FINAL=$(FINAL)
+ make -f makefile.b32 FINAL=$(FINAL)
# cd $(WXDIR)\samples\regtest
# cd $(WXDIR)\samples\regtest
-# nmake -f makefile.b32 FINAL=$(FINAL)
+# make -f makefile.b32 FINAL=$(FINAL)
clean:
cd $(WXDIR)\samples\splitter
clean:
cd $(WXDIR)\samples\splitter
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\minimal
cd $(WXDIR)\samples\minimal
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\layout
cd $(WXDIR)\samples\layout
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\printing
cd $(WXDIR)\samples\printing
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\toolbar
cd $(WXDIR)\samples\toolbar
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\dialogs
cd $(WXDIR)\samples\dialogs
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\resource
cd $(WXDIR)\samples\resource
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\listctrl
cd $(WXDIR)\samples\listctrl
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\treectrl
cd $(WXDIR)\samples\treectrl
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\validate
cd $(WXDIR)\samples\validate
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\docview
cd $(WXDIR)\samples\docview
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\docvwmdi
cd $(WXDIR)\samples\docvwmdi
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\controls
cd $(WXDIR)\samples\controls
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\nativdlg
cd $(WXDIR)\samples\nativdlg
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\internat
cd $(WXDIR)\samples\internat
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\checklst
cd $(WXDIR)\samples\checklst
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\ownerdrw
cd $(WXDIR)\samples\ownerdrw
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\joytest
cd $(WXDIR)\samples\joytest
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\regtest
cd $(WXDIR)\samples\regtest
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\taskbar
cd $(WXDIR)\samples\taskbar
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\sashtest
cd $(WXDIR)\samples\sashtest
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\memcheck
cd $(WXDIR)\samples\memcheck
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\minifram
cd $(WXDIR)\samples\minifram
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\bombs
cd $(WXDIR)\samples\bombs
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\fractal
cd $(WXDIR)\samples\fractal
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\wxpoem
cd $(WXDIR)\samples\wxpoem
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\typetest
cd $(WXDIR)\samples\typetest
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\proplist
cd $(WXDIR)\samples\proplist
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
cd $(WXDIR)\samples\image
cd $(WXDIR)\samples\image
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
- nmake -f makefile.b32 clean
+ make -f makefile.b32 clean
IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
-wxPropertySheet::wxPropertySheet(wxString name)
+wxPropertySheet::wxPropertySheet(const wxString& name)
:m_properties(wxKEY_STRING),m_name(name)
{
}
:m_properties(wxKEY_STRING),m_name(name)
{
}
}
// Get property by name
}
// Get property by name
-wxProperty *wxPropertySheet::GetProperty(wxString name)
+wxProperty *wxPropertySheet::GetProperty(const wxString& name) const
{
wxNode *node = m_properties.Find((const char*) name);
if (!node)
{
wxNode *node = m_properties.Find((const char*) name);
if (!node)
else
return (wxProperty *)node->Data();
}
else
return (wxProperty *)node->Data();
}
-bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
+
+bool wxPropertySheet::SetProperty(const wxString& name, const wxPropertyValue& value)
{
wxProperty* prop = GetProperty(name);
if(prop){
{
wxProperty* prop = GetProperty(name);
if(prop){
-void wxPropertySheet::RemoveProperty(wxString name)
+
+void wxPropertySheet::RemoveProperty(const wxString& name)
{
wxNode *node = m_properties.Find(name);
if(node)
{
wxNode *node = m_properties.Find(name);
if(node)
m_properties.DeleteNode(node);
}
}
m_properties.DeleteNode(node);
}
}
-bool wxPropertySheet::HasProperty(wxString name)
+
+bool wxPropertySheet::HasProperty(const wxString& name) const
{
return (GetProperty(name)?TRUE:FALSE);
}
{
return (GetProperty(name)?TRUE:FALSE);
}
// Clear all properties
void wxPropertySheet::Clear(void)
{
// Clear all properties
void wxPropertySheet::Clear(void)
{
if (parent)
{
if (parent->GetDefaultItem() == (wxButton*) this)
if (parent)
{
if (parent->GetDefaultItem() == (wxButton*) this)
- parent->SetDefaultItem(NULL);
+ parent->SetDefaultItem((wxButton*) NULL);
// but I think this should work, if we destroy the children first.
// Note that this might need to be done for wxFrame also.
DestroyChildren();
// but I think this should work, if we destroy the children first.
// Note that this might need to be done for wxFrame also.
DestroyChildren();
-
- // This causes a crash in e.g. the resource sample when closing
- // the example dialog. TODO: Probably not necessary (?)
-#if 0
- // Now process all events, because otherwise
- // this might remain on the screen.
- Display* display;
- if (m_mainWidget)
- display = XtDisplay((Widget) m_mainWidget);
- else
- display = (Display*) wxGetDisplay();
-
- XSync(display, FALSE);
- XEvent event;
- while (XtAppPending((XtAppContext) wxTheApp->GetAppContext())) {
- XFlush(display);
- XtAppNextEvent((XtAppContext) wxTheApp->GetAppContext(), &event);
- XtDispatchEvent(&event);
+
+ // The idea about doing it here is that if you have to remove the
+ // XtDestroyWidget from ~wxWindow, at least top-level windows
+ // will still be deleted (and destroy children implicitly).
+ if (GetMainWidget())
+ {
+ DetachWidget(GetMainWidget()); // Removes event handlers
+ XtDestroyWidget((Widget) GetMainWidget());
+ SetMainWidget((WXWidget) NULL);
}
// By default, pressing escape cancels the dialog
}
// By default, pressing escape cancels the dialog
m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
}
m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
}
+wxMenuBar::wxMenuBar(long WXUNUSED(style))
+{
+ m_eventHandler = this;
+ m_menuCount = 0;
+ m_menus = NULL;
+ m_titles = NULL;
+ m_menuBarFrame = NULL;
+ m_mainWidget = (WXWidget) NULL;
+ m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENU);
+ m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_MENUTEXT);
+ m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+}
+
wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
{
m_eventHandler = this;
wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
{
m_eventHandler = this;
// Destroy the window
if (GetMainWidget())
{
// Destroy the window
if (GetMainWidget())
{
- wxDeleteWindowFromTable((Widget) GetMainWidget());
+ // If this line (XtDestroyWidget) causes a crash, you may comment it out.
+ // Child widgets will get destroyed automatically when a frame
+ // or dialog is destroyed, but before that you may get some memory
+ // leaks and potential layout problems if you delete and then add
+ // child windows.
XtDestroyWidget((Widget) GetMainWidget());
SetMainWidget((WXWidget) NULL);
}
XtDestroyWidget((Widget) GetMainWidget());
SetMainWidget((WXWidget) NULL);
}
$(COMMDIR)\filefn.obj \
$(COMMDIR)\fileconf.obj \
$(COMMDIR)\framecmn.obj \
$(COMMDIR)\filefn.obj \
$(COMMDIR)\fileconf.obj \
$(COMMDIR)\framecmn.obj \
$(COMMDIR)\gdicmn.obj \
$(COMMDIR)\image.obj \
$(COMMDIR)\intl.obj \
$(COMMDIR)\gdicmn.obj \
$(COMMDIR)\image.obj \
$(COMMDIR)\intl.obj \
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
+$(COMMDIR)/ftp.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
$(COMMDIR)/gdicmn.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
wxMenuBar::wxMenuBar()
{
m_eventHandler = this;
wxMenuBar::wxMenuBar()
{
m_eventHandler = this;
+ m_menuCount = 0;
+ m_menus = NULL;
+ m_titles = NULL;
+ m_menuBarFrame = NULL;
+ m_hMenu = 0;
+}
+wxMenuBar::wxMenuBar( long WXUNUSED(style) )
+{
+ m_eventHandler = this;
m_menuCount = 0;
m_menus = NULL;
m_titles = NULL;
m_menuCount = 0;
m_menus = NULL;
m_titles = NULL;
m_rects = new wxRect[header->nCount];
m_rects = new wxRect[header->nCount];
- RECT* rect = (RECT*) (rgnData + sizeof(RGNDATAHEADER)) ;
+ RECT* rect = (RECT*) ((char*)rgnData + sizeof(RGNDATAHEADER)) ;
size_t i;
for (i = 0; i < header->nCount; i++)
{
m_rects[i] = wxRect(rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top);
size_t i;
for (i = 0; i < header->nCount; i++)
{
m_rects[i] = wxRect(rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top);
+ rect ++; // Advances pointer by sizeof(RECT)
}
m_numRects = header->nCount;
}
m_numRects = header->nCount;