]> git.saurik.com Git - wxWidgets.git/commitdiff
wxSize/wxPoint/wxRect versions of functions added to wxMSW, wxMotif;
authorJulian Smart <julian@anthemion.co.uk>
Sat, 28 Nov 1998 13:38:40 +0000 (13:38 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 28 Nov 1998 13:38:40 +0000 (13:38 +0000)
wxScrollBar::Set/GetPosition changed to Set/GetThumbPosition to avoid clash;
various other portability changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

70 files changed:
distrib/msw/generic.rsp
distrib/msw/msw.rsp
docs/latex/wx/treectrl.tex
docs/msw/install.txt
docs/msw/issues.txt
include/wx/gtk/scrolbar.h
include/wx/gtk1/scrolbar.h
include/wx/list.h
include/wx/memory.h
include/wx/motif/checkbox.h
include/wx/motif/choice.h
include/wx/motif/combobox.h
include/wx/motif/dialog.h
include/wx/motif/frame.h
include/wx/motif/gauge.h
include/wx/motif/listbox.h
include/wx/motif/mdi.h
include/wx/motif/radiobox.h
include/wx/motif/scrolbar.h
include/wx/motif/slider.h
include/wx/motif/statbmp.h
include/wx/motif/statbox.h
include/wx/motif/window.h
include/wx/msw/bitmap.h
include/wx/msw/button.h
include/wx/msw/checkbox.h
include/wx/msw/choice.h
include/wx/msw/control.h
include/wx/msw/dialog.h
include/wx/msw/frame.h
include/wx/msw/gauge95.h
include/wx/msw/gaugemsw.h
include/wx/msw/listbox.h
include/wx/msw/mdi.h
include/wx/msw/radiobox.h
include/wx/msw/scrolbar.h
include/wx/msw/setup.h
include/wx/msw/slider95.h
include/wx/msw/slidrmsw.h
include/wx/msw/statbmp.h
include/wx/msw/statbox.h
include/wx/msw/stattext.h
include/wx/msw/tbar95.h
include/wx/msw/textctrl.h
include/wx/msw/window.h
include/wx/stubs/scrolbar.h
samples/controls/controls.cpp
src/common/log.cpp
src/common/memory.cpp
src/common/string.cpp
src/common/variant.cpp
src/generic/gridg.cpp
src/gtk/scrolbar.cpp
src/gtk1/scrolbar.cpp
src/motif/app.cpp
src/motif/listbox.cpp
src/motif/scrolbar.cpp
src/motif/toolbar.cpp
src/motif/utils.cpp
src/motif/window.cpp
src/msw/bitmap.cpp
src/msw/cursor.cpp
src/msw/icon.cpp
src/msw/makefile.g95
src/msw/makefile.nt
src/msw/scrolbar.cpp
src/msw/textctrl.cpp
src/msw/treectrl.cpp
src/msw/window.cpp
src/stubs/scrolbar.cpp

index c9381aa6a51a1b6f26980a7eb8139527c0de9dd4..c550dcd5bf88dec257d6e8d4710956d7ab59b420 100644 (file)
@@ -55,7 +55,6 @@ src/zlib/*.mms
 include/wx/*.h
 include/wx/*.cpp
 include/wx/protocol/*.h
 include/wx/*.h
 include/wx/*.cpp
 include/wx/protocol/*.h
-include/wx/*.cpp
 include/wx/wx_setup.vms
 include/wx/common/*.h
 include/wx/generic/*.h
 include/wx/wx_setup.vms
 include/wx/common/*.h
 include/wx/generic/*.h
index 2f7894e3350ab3641e3bc6e0fee2380388a7dd59..88c7fa821a8260090b9a5bc320f962a23abfeed6 100644 (file)
@@ -35,6 +35,14 @@ src/msw/ctl3d/borland/*.*
 src/msw/ole/*.cpp
 src/msw/*.prj
 
 src/msw/ole/*.cpp
 src/msw/*.prj
 
+src/xpm/*.c
+src/xpm/*.h
+src/xpm/changes
+src/xpm/readme
+src/xpm/readme.msw
+src/xpm/copyrigh.t
+src/xpm/files
+
 include/wx/msw/*.h
 include/wx/msw/*.rc
 include/wx/msw/ctl3d/*.h
 include/wx/msw/*.h
 include/wx/msw/*.rc
 include/wx/msw/ctl3d/*.h
index 2c2ac8ac38058eeca32240afbf58e5e4c8ac51bb..c831025d97b7a3c4000e629110fdf4c01f3911e9 100644 (file)
@@ -1,7 +1,7 @@
 \section{\class{wxTreeCtrl}}\label{wxtreectrl}
 
 A tree control presents information as a hierarchy, with items that may be expanded
 \section{\class{wxTreeCtrl}}\label{wxtreectrl}
 
 A tree control presents information as a hierarchy, with items that may be expanded
-to show further items. Items in a tree control are referenced by long integer handles.
+to show further items. Items in a tree control are referenced by wxTreeItemId handles.
 
 To intercept events from a tree control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}.
 
 
 To intercept events from a tree control, use the event table macros described in \helpref{wxTreeEvent}{wxtreeevent}.
 
@@ -47,7 +47,7 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
 
 \wxheading{See also}
 
 
 \wxheading{See also}
 
-\helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp
+\helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp
 \helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 \helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
@@ -91,6 +91,38 @@ appropriately.}
 
 Destructor, destroying the list control.
 
 
 Destructor, destroying the list control.
 
+\membersection{wxTreeCtrl::AddRoot}\label{wxtreectrladdroot}
+
+\func{wxTreeItemId}{AddRoot}{\param{const wxString\&}{ text},
+ \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
+
+Adds the root node to the tree, returning the new item.
+
+If {\it image} > -1 and {\it selImage} is -1, the same image is used for
+both selected and unselected items.
+
+\membersection{wxTreeCtrl::AppendItem}\label{wxtreectrlappenditem}
+
+\func{wxTreeItemId}{AppendItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxString\&}{ text},
+ \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
+
+Appends an item to the end of the branch identified by {\it parent}, return a new item id.
+
+If {\it image} > -1 and {\it selImage} is -1, the same image is used for
+both selected and unselected items.
+
+\membersection{wxTreeCtrl::Collapse}\label{wxtreectrlcollapse}
+
+\func{void}{Collapse}{\param{const wxTreeItemId\&}{ item}}
+
+Collapses the given item.
+
+\membersection{wxTreeCtrl::CollapseAndReset}\label{wxtreectrlcollapseandreset}
+
+\func{void}{CollapseAndReset}{\param{const wxTreeItemId\&}{ item}}
+
+Collapses the given item and removes all children.
+
 \membersection{wxTreeCtrl::Create}\label{wxtreectrlcreate}
 
 \func{bool}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
 \membersection{wxTreeCtrl::Create}\label{wxtreectrlcreate}
 
 \func{bool}{wxTreeCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
@@ -99,21 +131,21 @@ Destructor, destroying the list control.
 
 Creates the tree control. See \helpref{wxTreeCtrl::wxTreeCtrl}{wxtreectrlconstr} for further details.
 
 
 Creates the tree control. See \helpref{wxTreeCtrl::wxTreeCtrl}{wxtreectrlconstr} for further details.
 
-\membersection{wxTreeCtrl::DeleteAllItems}\label{wxtreectrldeleteallitems}
+\membersection{wxTreeCtrl::Delete}\label{wxtreectrldelete}
 
 
-\func{bool}{DeleteAllItems}{\void}
+\func{void}{Delete}{\param{const wxTreeItemId\&}{ item}}
 
 
-Deletes all the items in the control.
+Deletes the specified item.
 
 
-\membersection{wxTreeCtrl::DeleteItem}\label{wxtreectrldeleteitem}
+\membersection{wxTreeCtrl::DeleteAllItems}\label{wxtreectrldeleteallitems}
 
 
-\func{bool}{DeleteItem}{\param{long }{item}}
+\func{void}{DeleteAllItems}{\void}
 
 
-Deletes the specified item.
+Deletes all the items in the control.
 
 \membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel}
 
 
 \membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel}
 
-\func{wxTextCtrl*}{EditLabel}{\param{long }{item}, \param{wxClassInfo*}{ textControlClass = CLASSINFO(wxTextCtrl)}}
+\func{wxTextCtrl*}{EditLabel}{\param{const wxTreeItemId\&}{ 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.
 
 
 Starts editing the label of the given item, returning the text control that the tree control uses for editing.
 
@@ -130,7 +162,7 @@ This function is currently supported under Windows only.
 
 \membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel}
 
 
 \membersection{wxTreeCtrl::EndEditLabel}\label{wxtreectrlendeditlabel}
 
-\func{bool}{EndEditLabel}{\param{bool }{cancelEdit}}
+\func{void}{EndEditLabel}{\param{bool }{cancelEdit}}
 
 Ends label editing. If {\it cancelEdit} is TRUE, the edit will be cancelled.
 
 
 Ends label editing. If {\it cancelEdit} is TRUE, the edit will be cancelled.
 
@@ -142,31 +174,28 @@ This function is currently supported under Windows only.
 
 \membersection{wxTreeCtrl::EnsureVisible}\label{wxtreectrlensurevisible}
 
 
 \membersection{wxTreeCtrl::EnsureVisible}\label{wxtreectrlensurevisible}
 
-\func{bool}{EnsureVisible}{\param{long }{item}}
+\func{void}{EnsureVisible}{\param{const wxTreeItemId\&}{ item}}
 
 Scrolls and/or expands items to ensure that the given item is visible.
 
 
 Scrolls and/or expands items to ensure that the given item is visible.
 
-\membersection{wxTreeCtrl::ExpandItem}\label{wxtreectrlexpanditem}
+\membersection{wxTreeCtrl::Expand}\label{wxtreectrlexpand}
 
 
-\func{bool}{ExpandItem}{\param{long }{item}, \param{int }{action}}
+\func{void}{Expand}{\param{const wxTreeItemId\&}{ item}}
 
 Expands the given item.
 
 
 Expands the given item.
 
-{\it action} may be one of:
+\membersection{wxTreeCtrl::GetBoundingRect}\label{wxtreectrlgetitemrect}
 
 
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{\windowstyle{wxTREE\_EXPAND\_EXPAND}}{Expands the item.}
-\twocolitem{\windowstyle{wxTREE\_EXPAND\_COLLAPSE}}{Collapses the item.}
-\twocolitem{\windowstyle{wxTREE\_EXPAND\_COLLAPSE\_RESET}}{Collapses the item and removes the child items.}
-\twocolitem{\windowstyle{wxTREE\_EXPAND\_TOGGLE}}{Expands if the item is collapsed, collapses if the item is expanded.}
-\end{twocollist}
+\constfunc{void}{GetBoundingRect}{\param{const wxTreeItemId\&}{ item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = FALSE}}
+
+Returns the position and size of the rectangle bounding the item.
 
 
-\membersection{wxTreeCtrl::GetChild}\label{wxtreectrlgetchild}
+\membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount}
 
 
-\constfunc{long}{GetChild}{\param{long }{item}}
+\constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = TRUE}}
 
 
-Call this function to retrieve the tree view item that is the first child of the item specified by {\it item}.
+Returns the number of items in the branch. If {\it recursively} is TRUE, returns the total number
+of descendants, otherwise only one level of children is counted.
 
 \membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount}
 
 
 \membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount}
 
@@ -180,9 +209,27 @@ Returns the number of items in the control.
 
 Returns the edit control used to edit a label.
 
 
 Returns the edit control used to edit a label.
 
+\membersection{wxTreeCtrl::GetFirstChild}\label{wxtreectrlgetfirstchild}
+
+\constfunc{wxTreeItemId}{GetFirstChild}{\param{const wxTreeItemId\&}{ item}, \param{long\& }{cookie}}
+
+Returns the first child; call \helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild} for the next child.
+
+For this enumeration function you must pass in a `cookie' parameter
+which is opaque for the application but is necessary for the library
+to make these functions reentrant (i.e. allow more than one
+enumeration on one and the same object simultaneously). The cookie passed to
+GetFirstChild and GetNextChild should be the same.
+
+Returns 0 if there are no further children.
+
+\wxheading{See also}
+
+\helpref{wxTreeCtrl::GetNextChild}{wxtreectrlgetnextchild}
+
 \membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem}
 
 \membersection{wxTreeCtrl::GetFirstVisibleItem}\label{wxtreectrlgetfirstvisibleitem}
 
-\constfunc{long}{GetFirstVisibleItem}{\void}
+\constfunc{wxTreeItemId}{GetFirstVisibleItem}{\void}
 
 Returns the first visible item.
 
 
 Returns the first visible item.
 
@@ -205,82 +252,103 @@ Returns the specified image list. {\it which} may be one of:
 
 Returns the current tree control indentation.
 
 
 Returns the current tree control indentation.
 
-\membersection{wxTreeCtrl::GetItem}\label{wxtreectrlgetitem}
+\membersection{wxTreeCtrl::GetItemData}\label{wxtreectrlgetitemdata}
 
 
-\constfunc{bool}{GetItem}{\param{wxTreeItem\& }{info}}
+\constfunc{wxTreeItemData*}{GetItemData}{\param{const wxTreeItemId\&}{ item}}
 
 
-Gets information about the item. See \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem} for more
-information.
+Returns the tree item data associated with the item.
 
 
-\membersection{wxTreeCtrl::GetItemData}\label{wxtreectrlgetitemdata}
+\wxheading{See also}
 
 
-\constfunc{long}{GetItemData}{\param{long }{item}}
+\helpref{wxTreeItemData}{wxtreeitemdata}
 
 
-Returns the client data associated with the item, if any.
+\membersection{wxTreeCtrl::GetItemImage}\label{wxtreectrlgetitemimage}
 
 
-\membersection{wxTreeCtrl::GetItemRect}\label{wxtreectrlgetitemrect}
+\constfunc{int}{GetItemImage}{\param{const wxTreeItemId\& }{item}}
 
 
-\constfunc{bool}{GetItemRect}{\param{long }{item}, \param{wxRect\& }{rect}, \param{bool }{textOnly = FALSE}}
+Gets the normal item image.
 
 
-Returns the position and size of the rectangle bounding the item.
+\membersection{wxTreeCtrl::GetItemText}\label{wxtreectrlgetitemtext}
 
 
-\membersection{wxTreeCtrl::GetItemState}\label{wxtreectrlgetitemstate}
+\constfunc{wxString}{GetItemText}{\param{const wxTreeItemId\&}{ item}}
 
 
-\constfunc{int}{GetItemState}{\param{long }{item}, \param{long }{stateMask}}
+Returns the item label.
 
 
-Gets the item state. For a list of state flags, see \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem}.
+\membersection{wxTreeCtrl::GetNextChild}\label{wxtreectrlgetnextchild}
 
 
-\membersection{wxTreeCtrl::GetItemText}\label{wxtreectrlgetitemtext}
+\constfunc{wxTreeItemId}{GetNextChild}{\param{const wxTreeItemId\&}{ item}, \param{long\& }{cookie}}
 
 
-\constfunc{wxString}{GetItemText}{\param{long }{item}}
+Returns the next child; call \helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild} for the first child.
 
 
-Returns the item label.
+For this enumeration function you must pass in a `cookie' parameter
+which is opaque for the application but is necessary for the library
+to make these functions reentrant (i.e. allow more than one
+enumeration on one and the same object simultaneously). The cookie passed to
+GetFirstChild and GetNextChild should be the same.
 
 
-\membersection{wxTreeCtrl::GetNextItem}\label{wxtreectrlgetnextitem}
+Returns 0 if there are no further children.
 
 
-\constfunc{long}{GetNextItem}{\param{long }{item}, \param{int }{code}}
+\wxheading{See also}
 
 
-Searches for an item using the given criterion, starting from {\it item}.
+\helpref{wxTreeCtrl::GetFirstChild}{wxtreectrlgetfirstchild}
 
 
-Returns the item or 0 if unsuccessful.
+\membersection{wxTreeCtrl::GetNextSibling}\label{wxtreectrlgetnextsibling}
 
 
-{\it code} can be one of:
+\constfunc{wxTreeItemId}{GetNextSibling}{\param{const wxTreeItemId\&}{ item}}
 
 
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{wxTREE\_NEXT\_CARET}{Retrieves the currently selected item.}
-\twocolitem{wxTREE\_NEXT\_CHILD}{Retrieves the first child item. The hItem parameter must be NULL.}
-\twocolitem{wxTREE\_NEXT\_DROPHILITE}{Retrieves the item that is the target of a drag-and-drop operation.}
-\twocolitem{wxTREE\_NEXT\_FIRSTVISIBLE}{Retrieves the first visible item.}
-\twocolitem{wxTREE\_NEXT\_NEXT}{Retrieves the next sibling item.}
-\twocolitem{wxTREE\_NEXT\_NEXTVISIBLE}{Retrieves the next visible item that follows the specified item.}
-\twocolitem{wxTREE\_NEXT\_PARENT}{Retrieves the parent of the specified item.}
-\twocolitem{wxTREE\_NEXT\_PREVIOUS}{Retrieves the previous sibling item.}
-\twocolitem{wxTREE\_NEXT\_PREVIOUSVISIBLE}{Retrieves the first visible item that precedes the specified item.}
-\twocolitem{wxTREE\_NEXT\_ROOT}{Retrieves the first child item of the root item of which the specified item is a part.}
-\end{twocollist}
+Returns the next sibling of the specified item; call \helpref{wxTreeCtrl::GetPrevSibling}{wxtreectrlgetprevsibling} for the previous sibling.
 
 
-\membersection{wxTreeCtrl::GetNextVisibleItem}\label{wxtreectrlgetnextvisibleitem}
+Returns 0 if there are no further siblings.
 
 
-\constfunc{long}{GetNextVisibleItem}{\param{long }{item}}
+\wxheading{See also}
+
+\helpref{wxTreeCtrl::GetPrevSibling}{wxtreectrlgetprevsibling}
+
+\membersection{wxTreeCtrl::GetNextVisible}\label{wxtreectrlgetnextvisible}
+
+\constfunc{wxTreeItemId}{GetNextVisible}{\param{const wxTreeItemId\&}{ item}}
 
 Returns the next visible item.
 
 \membersection{wxTreeCtrl::GetParent}\label{wxtreectrlgetparent}
 
 
 Returns the next visible item.
 
 \membersection{wxTreeCtrl::GetParent}\label{wxtreectrlgetparent}
 
-\constfunc{long}{GetParent}{\param{long }{item}}
+\constfunc{wxTreeItemId}{GetParent}{\param{const wxTreeItemId\&}{ item}}
 
 Returns the item's parent.
 
 
 Returns the item's parent.
 
+\membersection{wxTreeCtrl::GetPrevSibling}\label{wxtreectrlgetprevsibling}
+
+\constfunc{wxTreeItemId}{GetPrevSibling}{\param{const wxTreeItemId\&}{ item}}
+
+Returns the previous sibling of the specified item; call \helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling} for the next sibling.
+
+Returns 0 if there are no further children.
+
+\wxheading{See also}
+
+\helpref{wxTreeCtrl::GetNextSibling}{wxtreectrlgetnextsibling}
+
+\membersection{wxTreeCtrl::GetPrevVisible}\label{wxtreectrlgetprevvisible}
+
+\constfunc{wxTreeItemId}{GetPrevVisible}{\param{const wxTreeItemId\&}{ item}}
+
+Returns the previous visible item.
+
 \membersection{wxTreeCtrl::GetRootItem}\label{wxtreectrlgetrootitem}
 
 \membersection{wxTreeCtrl::GetRootItem}\label{wxtreectrlgetrootitem}
 
-\constfunc{long}{GetRootItem}{\void}
+\constfunc{wxTreeItemId}{GetRootItem}{\void}
 
 Returns the root item for the tree control.
 
 
 Returns the root item for the tree control.
 
+\membersection{wxTreeCtrl::GetSelectedItemImage}\label{wxtreectrlgetselecteditemimage}
+
+\constfunc{int}{GetSelectedItemImage}{\param{const wxTreeItemId\& }{item}}
+
+Gets the selected item image.
+
 \membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection}
 
 \membersection{wxTreeCtrl::GetSelection}\label{wxtreectrlgetselection}
 
-\constfunc{long}{GetSelection}{\void}
+\constfunc{wxTreeItemId}{GetSelection}{\void}
 
 Returns the selection, or 0 if there is no selection.
 
 
 Returns the selection, or 0 if there is no selection.
 
@@ -308,32 +376,57 @@ in {\it flags}. {\it flags} is a bitlist of the following:
 
 \membersection{wxTreeCtrl::InsertItem}\label{wxtreectrlinsertitem}
 
 
 \membersection{wxTreeCtrl::InsertItem}\label{wxtreectrlinsertitem}
 
-\func{long}{InsertItem}{\param{long }{parent}, \param{wxTreeItem\& }{info}, \param{long }{insertAfter = wxTREE\_INSERT\_LAST}}
+\func{wxTreeItemId}{InsertItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxTreeItemId\& }{previous}, \param{const wxString\&}{ text},
+ \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
 
 
-Inserts an item. For more information on {\it info}, see \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem}.
-
-\func{long}{InsertItem}{\param{long }{parent}, \param{const wxString\& }{label}, \param{int }{image = -1}, \param{int }{selImage = -1}, \param{long }{insertAfter = wxTREE\_INSERT\_LAST}}
-
-Inserts an item.
+Inserts an item after a given one.
 
 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
 both selected and unselected items.
 
 
 If {\it image} > -1 and {\it selImage} is -1, the same image is used for
 both selected and unselected items.
 
+\membersection{wxTreeCtrl::IsExpanded}\label{wxtreectrlisexpanded}
+
+\constfunc{bool}{IsExpanded}{\param{const wxTreeItemId\&}{ item}}
+
+Returns TRUE if the item is expanded (only makes sense if it has children).
+
+\membersection{wxTreeCtrl::IsSelected}\label{wxtreectrlisselected}
+
+\constfunc{bool}{IsSelected}{\param{const wxTreeItemId\&}{ item}}
+
+Returns TRUE if the item is selected.
+
+\membersection{wxTreeCtrl::IsVisible}\label{wxtreectrlisvisible}
+
+\constfunc{bool}{IsVisible}{\param{const wxTreeItemId\&}{ item}}
+
+Returns TRUE if the item is visible (it might be outside the view, or not expanded).
+
 \membersection{wxTreeCtrl::ItemHasChildren}\label{wxtreectrlitemhaschildren}
 
 \membersection{wxTreeCtrl::ItemHasChildren}\label{wxtreectrlitemhaschildren}
 
-\constfunc{bool}{ItemHasChildren}{\param{long }{item}}
+\constfunc{bool}{ItemHasChildren}{\param{const wxTreeItemId\&}{ item}}
 
 Returns TRUE if the item has children.
 
 
 Returns TRUE if the item has children.
 
+\membersection{wxTreeCtrl::PrependItem}\label{wxtreectrlprependitem}
+
+\func{wxTreeItemId}{PrependItem}{\param{const wxTreeItemId\& }{parent}, \param{const wxString\&}{ text},
+ \param{int}{ image = -1}, \param{int}{ selImage = -1}, \param{wxTreeItemData*}{ data = NULL}}
+
+Appends an item as the first child of {\it parent}, return a new item id.
+
+If {\it image} > -1 and {\it selImage} is -1, the same image is used for
+both selected and unselected items.
+
 \membersection{wxTreeCtrl::ScrollTo}\label{wxtreectrlscrollto}
 
 \membersection{wxTreeCtrl::ScrollTo}\label{wxtreectrlscrollto}
 
-\func{bool}{ScrollTo}{\param{long }{item}}
+\func{void}{ScrollTo}{\param{const wxTreeItemId\&}{ item}}
 
 
-selects the specified item and scrolls the item into view,
+Scrolls the specified item into view.
 
 \membersection{wxTreeCtrl::SelectItem}\label{wxtreectrlselectitem}
 
 
 \membersection{wxTreeCtrl::SelectItem}\label{wxtreectrlselectitem}
 
-\func{bool}{SelectItem}{\param{long }{item}}
+\func{bool}{SelectItem}{\param{const wxTreeItemId\&}{ item}}
 
 Selects the given item.
 
 
 Selects the given item.
 
@@ -350,82 +443,117 @@ Sets the indentation for the tree control.
 Sets the image list. {\it which} should be one of wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL and
 wxIMAGE\_LIST\_STATE.
 
 Sets the image list. {\it which} should be one of wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL and
 wxIMAGE\_LIST\_STATE.
 
-\membersection{wxTreeCtrl::SetItem}\label{wxtreectrlsetitem}
-
-\func{bool}{SetItem}{\param{wxTreeItem\& }{info}}
-
-Sets the properties of the item.
-
-The members of wxTreeItem are as follows:
+\membersection{wxTreeCtrl::SetItemData}\label{wxtreectrlsetitemdata}
 
 
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{m\_mask}{A bitlist specifying the valid members. See below for mask flags.}
-\twocolitem{m\_itemId}{The item identifier.}
-\twocolitem{m\_state}{The item state. See below for state flags.}
-\twocolitem{m\_stateMask}{A bitlist specifying the valid contents of {\it m\_state}. These flags
-are taken from the same set of symbols as {\it m\_state}.}
-\twocolitem{m\_text}{The item label.}
-\twocolitem{m\_image}{The item image index (an index into the appropriate image list).}
-\twocolitem{m\_selectedImage}{The item selected index (an index into the appropriate image list).}
-\twocolitem{m\_children}{The number of child items that this item has.}
-\twocolitem{m\_data}{The application-defined data associated with this item.}
-\end{twocollist}
+\func{void}{SetItemData}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemData* }{data}}
 
 
-Valid mask flags are:
+Sets the item client data.
 
 
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{wxTREE\_MASK\_HANDLE}{The {\it m\_itemId} member is valid.}
-\twocolitem{wxTREE\_MASK\_STATE}{The {\it m\_state} member is valid.}
-\twocolitem{wxTREE\_MASK\_TEXT}{The {\it m\_text} member is valid.}
-\twocolitem{wxTREE\_MASK\_IMAGE}{The {\it m\_image} member is valid.}
-\twocolitem{wxTREE\_MASK\_SELECTED\_IMAGE}{The {\it m\_selectedImage} member is valid.}
-\twocolitem{wxTREE\_MASK\_CHILDREN}{The {\it m\_children} member is valid.}
-\twocolitem{wxTREE\_MASK\_DATA}{The {\it m\_data} member is valid.}
-\end{twocollist}
+\membersection{wxTreeCtrl::SetItemHasChildren}\label{wxtreectrlsetitemhaschildren}
 
 
-Valid state and state mask flags are:
+\func{void}{SetItemHasChildren}{\param{const wxTreeItemId\&}{ item}, \param{bool }{hasChildren = TRUE}}
 
 
-\twocolwidtha{5cm}
-\begin{twocollist}\itemsep=0pt
-\twocolitem{wxTREE\_STATE\_BOLD}{The label is emboldened.}
-\twocolitem{wxTREE\_STATE\_DROPHILITED}{The item indicates it is a drop target.}
-\twocolitem{wxTREE\_STATE\_EXPANDED}{The item is expanded.}
-\twocolitem{wxTREE\_STATE\_EXPANDEDONCE}{The item's list of child items has been expanded at least once.}
-\twocolitem{wxTREE\_STATE\_FOCUSED}{The item has the focus, so it is surrounded by a standard focus rectangle.
-Only one item can have the focus.}
-\twocolitem{wxTREE\_STATE\_SELECTED}{The item is selected.}
-\twocolitem{wxTREE\_STATE\_CUT}{The item is selected as part of a cut and paste operation.}
-\end{twocollist}
+Force appearance of the button next to the item. This is useful to
+allow the user to expand the items which don't have any children now,
+but instead adding them only when needed, thus minimizing memory
+usage and loading time.
 
 \membersection{wxTreeCtrl::SetItemImage}\label{wxtreectrlsetitemimage}
 
 
 \membersection{wxTreeCtrl::SetItemImage}\label{wxtreectrlsetitemimage}
 
-\func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}, \param{int }{selImage}}
+\func{void}{SetItemImage}{\param{const wxTreeItemId\&}{ item}, \param{int }{image}}
 
 
-Sets the item image and selected image. These are indices into the assciated image list.
+Sets the normal item image. This is an index into the assciated image list.
 
 
-\membersection{wxTreeCtrl::SetItemState}\label{wxtreectrlsetitemstate}
+\membersection{wxTreeCtrl::SetItemSelectedImage}\label{wxtreectrlsetitemselectedimage}
 
 
-\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}}
+\func{void}{SetItemSelectedImage}{\param{const wxTreeItemId\&}{ item}, \param{int }{selImage}}
 
 
-Sets the item state. See \helpref{wxTreeCtrl::SetItem}{wxtreectrlsetitem} for valid state and state mask flags.
+Sets the item selected image. This is an index into the assciated image list.
 
 \membersection{wxTreeCtrl::SetItemText}\label{wxtreectrlsetitemtext}
 
 
 \membersection{wxTreeCtrl::SetItemText}\label{wxtreectrlsetitemtext}
 
-\func{void}{SetItemText}{\param{long }{item}, \param{const wxString\& }{text}}
+\func{void}{SetItemText}{\param{const wxTreeItemId\&}{ item}, \param{const wxString\& }{text}}
 
 Sets the item label.
 
 
 Sets the item label.
 
-\membersection{wxTreeCtrl::SetItemData}\label{wxtreectrlsetitemdata}
+\membersection{wxTreeCtrl::SortChildren}\label{wxtreectrlsortchildren}
 
 
-\func{bool}{SetItemData}{\param{long }{item}, \param{long }{data}}
+\func{void}{SortChildren}{\param{const wxTreeItemId\&}{ item}, \param{wxTreeItemCmpFunc*}{ cmpFunction = NULL}}
 
 
-Sets the item client data.
+Sorts the children of the given item. If {\it cmpFunction} is NULL, sorts in ascending alphabetical order;
+otherwise the custom sort function is used, as follows:
 
 
-\membersection{wxTreeCtrl::SortChildren}\label{wxtreectrlsortchildren}
+{\small
+\begin{verbatim}
+// a callback function used for sorting tree items, it should return -1 if the
+// first item precedes the second, +1 if the second precedes the first or 0 if
+// they're equivalent
+class wxTreeItemData;
+typedef int (*wxTreeItemCmpFunc)(wxTreeItemData *item1, wxTreeItemData *item2);
+\end{verbatim}
+}
+
+\wxheading{See also}
+
+\helpref{wxTreeItemData}{wxtreeitemdata}
+
+\membersection{wxTreeCtrl::Toggle}\label{wxtreectrltoggle}
+
+\func{void}{Toggle}{\param{const wxTreeItemId\&}{ item}}
+
+Toggles the given item between collapsed and expanded states.
+
+\membersection{wxTreeCtrl::Unselect}\label{wxtreectrlunselect}
+
+\func{void}{Unselect}{\void}
+
+Removes the selection from the currently selected item (if any).
+
+\section{\class{wxTreeItemData}}\label{wxtreeitemdata}
+
+wxTreeItemData is some (arbitrary) user class associated with some item. The
+main advantage of having this class (compared to the old untyped interface) is
+that wxTreeItemData's are destroyed automatically by the tree and, as this
+class has virtual dtor, it means that the memory will be automatically
+freed. We don't just use wxObject instead of wxTreeItemData because
+the size of this class is critical: in any real application, each tree leaf
+will have wxTreeItemData associated with it and number of leaves may be
+quite big.
+
+Because the objects of this class are deleted by the tree, they should
+always be allocated on the heap.
+
+\wxheading{Derived from}
+
+wxTreeItemId
+
+\wxheading{See also}
+
+\helpref{wxTreeCtrl}{wxtreectrl}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxTreeItemData::wxTreeItemData}\label{wxtreeitemdataconstr}
+
+\func{}{wxTreeItemData}{\void}
+
+Default constructor.
+
+\membersection{wxTreeItemData::\destruct{wxTreeItemData}}
+
+\func{void}{\destruct{wxTreeItemData}}{\void}
+
+Virtual destructor.
+
+\membersection{wxTreeItemData::GetId}\label{wxtreeitemdatagetid}
+
+\func{const wxTreeItem\&}{GetId}{\void}
+
+Returns the item associated with this node.
+
+\membersection{wxTreeItemData::SetId}\label{wxtreeitemdatasetid}
 
 
-\func{bool}{SortChildren}{\param{long }{item}}
+\func{void}{SetId}{\param{const wxTreeItemId\&}{ id}}
 
 
-Sorts the children of the given item in ascending alphabetical order.
+Sets the item associated with this node.
 
 
index 3a2834a09a623aa9d98dca88e2d95c6f513fff4c..145b099a59184168c52bd5a1203d83ba93989d1d 100644 (file)
@@ -26,11 +26,13 @@ WXWIN environment variable to point to this directory.
 Compilation
 -----------
 
 Compilation
 -----------
 
-At present, wxWindows compiles with VC++ 1.5, VC++ 4.0, VC++ 5.0,
-BC++ 4.5/5.0, Gnu-Win32 b19, and Mingw32.
+At present, wxWindows compiles with VC++ 4.0/5.0/6.0,
+BC++ 4.5/5.0, Gnu-Win32 b19/b20, and Mingw32. It may compile
+with 16-bit compilers (BC++ and VC++ 1.5) but this hasn't
+been tested lately.
 
 
-Visual C++ 4.0/5.0 compilation
-------------------------------
+Visual C++ 4.0/5.0/6.0 compilation
+----------------------------------
 
 1. Change directory to wx\src\msw. Type 'nmake -f makefile.nt' to
    make the wxWindows core library.
 
 1. Change directory to wx\src\msw. Type 'nmake -f makefile.nt' to
    make the wxWindows core library.
@@ -58,7 +60,7 @@ Borland C++ 4.5/5.0 compilation
    minimal, docview, mdi. The utils makefile does not yet work.
 
 Gnu-Win32 b19/b20/Mingw32 compilation
    minimal, docview, mdi. The utils makefile does not yet work.
 
 Gnu-Win32 b19/b20/Mingw32 compilation
----------------------------------
+-------------------------------------
 
 wxWindows 2.0 supports Gnu-Win32/Cygwin b19, b20, Mingw32, and Mingw32/EGCS.
 
 
 wxWindows 2.0 supports Gnu-Win32/Cygwin b19, b20, Mingw32, and Mingw32/EGCS.
 
@@ -91,6 +93,9 @@ Here are the steps required:
   to OPTIONS for Mingw32, or removing it for Cygnus Gnu-Win32.
   For Mingw32/EGCS, add both __MINGW32__ and __EGCS__.
 
   to OPTIONS for Mingw32, or removing it for Cygnus Gnu-Win32.
   For Mingw32/EGCS, add both __MINGW32__ and __EGCS__.
 
+- Mingw32 may not support winsock.h, so comment out
+  socket-related files in src/msw/makefile.g95.
+
 - Use the makefile.g95 files for compiling wxWindows and samples,
   e.g.:
   > cd c:\wx\src\msw
 - Use the makefile.g95 files for compiling wxWindows and samples,
   e.g.:
   > cd c:\wx\src\msw
@@ -101,7 +106,8 @@ Here are the steps required:
 - Use the 'strip' command to reduce executable size.
 
 - With Cygnus Gnu-Win32, you can invoke gdb --nw myfile.exe to
 - Use the 'strip' command to reduce executable size.
 
 - With Cygnus Gnu-Win32, you can invoke gdb --nw myfile.exe to
-  debug an executable.
+  debug an executable. If there are memory leaks, they will be
+  flagged when the program quits.
 
 - If using GnuWin32 b18, you will need to copy windres.exe
   from e.g. the Mingw32 distribution, to a directory in your path.
 
 - If using GnuWin32 b18, you will need to copy windres.exe
   from e.g. the Mingw32 distribution, to a directory in your path.
index 25655ae98d5519d9867b59a7396613d532aa9e0f..73e607511fee834dc4073b436e32775b059cd73e 100644 (file)
@@ -7,3 +7,12 @@ Owner-draw menus
 If USE_OWNER_DRAWN = 1 and you create a wxMenu, you get 'all bets
 are off' memory checking warnings from wxWindows.
 
 If USE_OWNER_DRAWN = 1 and you create a wxMenu, you get 'all bets
 are off' memory checking warnings from wxWindows.
 
+Memory-checking subsystem
+-------------------------
+
+This conflicts with wxUSE_IOSTREAMSH = 0 using MS VC++ 5.0
+(crashes the template code). It should be switched off if you
+wish to use wxUSE_IOSTREAMSH = 0.
+
+
+
index 5bb14787bf4c84aa72a9f91e743966df2b75b69d..98a3da43b1e7dcfc80ba48f8f68f5f8a1dbc0c90 100644 (file)
@@ -58,11 +58,11 @@ class wxScrollBar: public wxControl
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr );
     ~wxScrollBar(void);
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr );
     ~wxScrollBar(void);
-    int GetPosition(void) const;
+    int GetThumbPosition(void) const;
     int GetThumbSize() const;
     int GetPageSize() const;
     int GetRange() const;
     int GetThumbSize() const;
     int GetPageSize() const;
     int GetRange() const;
-    virtual void SetPosition( int viewStart );
+    virtual void SetThumbPosition( int viewStart );
     virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
       bool refresh = TRUE );
 
     virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
       bool refresh = TRUE );
 
index 5bb14787bf4c84aa72a9f91e743966df2b75b69d..98a3da43b1e7dcfc80ba48f8f68f5f8a1dbc0c90 100644 (file)
@@ -58,11 +58,11 @@ class wxScrollBar: public wxControl
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr );
     ~wxScrollBar(void);
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr );
     ~wxScrollBar(void);
-    int GetPosition(void) const;
+    int GetThumbPosition(void) const;
     int GetThumbSize() const;
     int GetPageSize() const;
     int GetRange() const;
     int GetThumbSize() const;
     int GetPageSize() const;
     int GetRange() const;
-    virtual void SetPosition( int viewStart );
+    virtual void SetThumbPosition( int viewStart );
     virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
       bool refresh = TRUE );
 
     virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
       bool refresh = TRUE );
 
index 696162ab4400a75e5048d57fdc2e3ecea54cff17..625387f67ea3057df787d3e717c16159dd839bcb 100644 (file)
@@ -144,6 +144,10 @@ public:
     const char *GetKeyString() const { return m_key.string; }
     long GetKeyInteger() const { return m_key.integer; }
 
     const char *GetKeyString() const { return m_key.string; }
     long GetKeyInteger() const { return m_key.integer; }
 
+    // Necessary for some existing code
+    void SetKeyString(char* s) { m_key.string = s; }
+    void SetKeyInteger(long i) { m_key.integer = i; }
+
 #ifdef wxLIST_COMPATIBILITY
     // compatibility methods
     wxNode *Next() const { return (wxNode *)GetNext(); }
 #ifdef wxLIST_COMPATIBILITY
     // compatibility methods
     wxNode *Next() const { return (wxNode *)GetNext(); }
index 1f2b25d19dfa8357df94bac99ebd074589bfa2c4..c6ee00a4e035ef8260d72c5b246a236895a493b4 100644 (file)
@@ -251,7 +251,7 @@ public:
 
     // Count the number of non-wxDebugContext-related objects
     // that are outstanding
 
     // Count the number of non-wxDebugContext-related objects
     // that are outstanding
-    static int CountObjectsLeft(void);
+    static int CountObjectsLeft(bool sinceCheckpoint = FALSE);
 
 private:
     // Store these here to allow access to the list without
 
 private:
     // Store these here to allow access to the list without
index 6dfd1d9d186534406c0fac56d40bcc2410585da5..6a159d529584f184a08abdc1c27b164467b61948 100644 (file)
@@ -75,9 +75,15 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
            const wxSize& size = wxDefaultSize, long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxCheckBoxNameStr);
            const wxSize& size = wxDefaultSize, long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxCheckBoxNameStr);
+
   virtual void SetValue(bool);
   virtual bool GetValue() const ;
   virtual void SetValue(bool);
   virtual bool GetValue() const ;
+
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   virtual void SetLabel(const wxBitmap *bitmap);
 };
 #endif
   virtual void SetLabel(const wxBitmap *bitmap);
 };
 #endif
index e3cf3d1cc71424bc4eed0328b6abe72083715ccd..1e3c872c5dd52474c11e743ce90b3c1024b42fc2 100644 (file)
@@ -55,7 +55,12 @@ class WXDLLEXPORT wxChoice: public wxControl
   virtual void SetSelection(int n);
   virtual int FindString(const wxString& s) const;
   virtual wxString GetString(int n) const ;
   virtual void SetSelection(int n);
   virtual int FindString(const wxString& s) const;
   virtual wxString GetString(int n) const ;
+
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   virtual wxString GetStringSelection() const ;
   virtual bool SetStringSelection(const wxString& sel);
 
   virtual wxString GetStringSelection() const ;
   virtual bool SetStringSelection(const wxString& sel);
 
index d0ccd9e8840bf2a0bd1859d4d7fe60c14a919b6c..890acc3fc0d032e9b896a9c9bded0c64e99f9684 100644 (file)
@@ -52,6 +52,9 @@ class WXDLLEXPORT wxComboBox: public wxChoice
            const wxString& name = wxComboBoxNameStr);
 
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
            const wxString& name = wxComboBoxNameStr);
 
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   // List functions
   virtual void Append(const wxString& item);
 
   // List functions
   virtual void Append(const wxString& item);
index 7c7ffdd34520f098297834d3080111127e5cffe8..36994eccb5edad0332ac8b42f694b00783cff353 100644 (file)
@@ -61,7 +61,13 @@ public:
 
   virtual bool Destroy();
   void SetClientSize(int width, int height);
 
   virtual bool Destroy();
   void SetClientSize(int width, int height);
+  void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   bool Show(bool show);
   void Iconize(bool iconize);
   void Raise();
   bool Show(bool show);
   void Iconize(bool iconize);
   void Raise();
index 0614b627baa36a5fa2e04588ddcdc63957e7be21..945ecbc5a8c40e2f5ca43b82b97cee257c853f77 100644 (file)
@@ -54,14 +54,29 @@ public:
            const wxString& name = wxFrameNameStr);
 
   virtual bool Destroy();
            const wxString& name = wxFrameNameStr);
 
   virtual bool Destroy();
+
   void SetClientSize(int width, int height);
   void SetClientSize(int width, int height);
+  void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
+
   void GetClientSize(int *width, int *height) const;
   void GetClientSize(int *width, int *height) const;
+  wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
 
   void GetSize(int *width, int *height) const ;
 
   void GetSize(int *width, int *height) const ;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void GetPosition(int *x, int *y) const ;
   void GetPosition(int *x, int *y) const ;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void ClientToScreen(int *x, int *y) const;
   void ClientToScreen(int *x, int *y) const;
+  wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
+
   void ScreenToClient(int *x, int *y) const;
   void ScreenToClient(int *x, int *y) const;
+  wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
 
   virtual bool OnClose();
 
 
   virtual bool OnClose();
 
index ff8dfa00ad1084ae15c2fb78749b1d4b1054bc0a..30381c04e892434e5392582afb634f87108195eb 100644 (file)
@@ -57,6 +57,9 @@ class WXDLLEXPORT wxGauge: public wxControl
   int GetValue() const ;
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   int GetValue() const ;
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
 
 
   virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
 
index 50954e53dde6e88d3622386aaa0cb0f0290ac3f1..0a7ccee86fc3a75049118458618e71d4dab77832 100644 (file)
@@ -74,7 +74,11 @@ class WXDLLEXPORT wxListBox: public wxControl
   virtual int GetSelections(wxArrayInt& aSelections) const;
   virtual bool Selected(int n) const ;
   virtual wxString GetString(int n) const ;
   virtual int GetSelections(wxArrayInt& aSelections) const;
   virtual bool Selected(int n) const ;
   virtual wxString GetString(int n) const ;
+
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   // Set the specified item at the first visible item
   // or scroll to max range.
 
   // Set the specified item at the first visible item
   // or scroll to max range.
index 73138a679a1cd67367e8806a5f9c45d3cd4fe291..74b483d5fa85b6970dc7354ccff383b265ccf4b3 100644 (file)
@@ -72,6 +72,7 @@ public:
   // and status bar size have been subtracted. If you want to manage your own
   // toolbar(s), don't call SetToolBar.
   void GetClientSize(int *width, int *height) const;
   // and status bar size have been subtracted. If you want to manage your own
   // toolbar(s), don't call SetToolBar.
   void GetClientSize(int *width, int *height) const;
+  wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
 
   // Get the active MDI child window
   wxMDIChildFrame *GetActiveChild() const ;
 
   // Get the active MDI child window
   wxMDIChildFrame *GetActiveChild() const ;
@@ -143,11 +144,23 @@ public:
   // Set menu bar
   void SetMenuBar(wxMenuBar *menu_bar);
   void SetTitle(const wxString& title);
   // Set menu bar
   void SetMenuBar(wxMenuBar *menu_bar);
   void SetTitle(const wxString& title);
+
   void SetClientSize(int width, int height);
   void SetClientSize(int width, int height);
+  void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
+
   void GetClientSize(int *width, int *height) const;
   void GetClientSize(int *width, int *height) const;
+  wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void GetSize(int *width, int *height) const;
   void GetSize(int *width, int *height) const;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void GetPosition(int *x, int *y) const ;
   void GetPosition(int *x, int *y) const ;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
 
   // Set icon
   virtual void SetIcon(const wxIcon& icon);
 
   // Set icon
   virtual void SetIcon(const wxIcon& icon);
@@ -206,11 +219,21 @@ class WXDLLEXPORT wxMDIClientWindow: public wxNotebook
   ~wxMDIClientWindow();
 
    void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   ~wxMDIClientWindow();
 
    void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+   void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+   void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
    void SetClientSize(int width, int height);
    void SetClientSize(int width, int height);
+   void SetClientSize(const wxSize& size) { wxWindow::SetClientSize(size); }
+
    void GetClientSize(int *width, int *height) const;
    void GetClientSize(int *width, int *height) const;
+   wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
 
    void GetSize(int *width, int *height) const ;
 
    void GetSize(int *width, int *height) const ;
+   wxSize GetSize() const { return wxWindow::GetSize(); }
+
    void GetPosition(int *x, int *y) const ;
    void GetPosition(int *x, int *y) const ;
+   wxPoint GetPosition() const { return wxWindow::GetPosition(); }
 
   // Note: this is virtual, to allow overridden behaviour.
   virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
 
   // Note: this is virtual, to allow overridden behaviour.
   virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
index 3b30067d9f72db41cde7e6cd4476f2595e8b76fb..78168c845f6a50e03098f91b5885cdde3b585228 100644 (file)
@@ -51,6 +51,9 @@ public:
   int GetSelection() const;
   wxString GetString(int N) const;
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   int GetSelection() const;
   wxString GetString(int N) const;
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
   void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
   void SetLabel(int item, const wxString& label) ;
   wxString GetLabel(int item) const;
   void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
   void SetLabel(int item, const wxString& label) ;
   wxString GetLabel(int item) const;
index e7881e617ded7b2ea1a1a62f5d384c120d941d91..2cda645071787d675855b5269a14546a29cdcde8 100644 (file)
@@ -45,12 +45,12 @@ public:
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr);
 
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr);
 
-  int GetPosition() const ;
+  int GetThumbPosition() const ;
   inline int GetThumbSize() const { return m_pageSize; }
   inline int GetPageSize() const { return m_viewSize; }
   inline int GetRange() const { return m_objectSize; }
 
   inline int GetThumbSize() const { return m_pageSize; }
   inline int GetPageSize() const { return m_viewSize; }
   inline int GetRange() const { return m_objectSize; }
 
-  virtual void SetPosition(int viewStart);
+  virtual void SetThumbPosition(int viewStart);
   virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
     bool refresh = TRUE);
 
   virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
     bool refresh = TRUE);
 
index adb5433418207cd54bb93fe91d8fee3a73bc7042..d0448159f12e6d44e1ee3a3a32c0d89ea4954c68 100644 (file)
@@ -52,7 +52,12 @@ public:
   virtual int GetValue() const ;
   virtual void SetValue(int);
   void GetSize(int *x, int *y) const ;
   virtual int GetValue() const ;
   virtual void SetValue(int);
   void GetSize(int *x, int *y) const ;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   void SetRange(int minValue, int maxValue);
 
 
   void SetRange(int minValue, int maxValue);
 
index 600168a84ee43bcfd05ae09e5c204601dd4a79a3..ccc1c0e86cce5a29cf2c35264608e8c201127a93 100644 (file)
@@ -50,6 +50,9 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
   virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
 
 
   inline wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
 
index 375c0001957fd13023a4a6e7c651d1deece90218..90069cea8eb6f11cc0a9a55312d767c0c2ddda95 100644 (file)
@@ -48,6 +48,10 @@ class WXDLLEXPORT wxStaticBox: public wxControl
   virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void SetLabel(const wxString& label);
   wxString GetLabel() const;
 
   void SetLabel(const wxString& label);
   wxString GetLabel() const;
 
index 06f9f56d99a16f82fe7d0dfb191636189d24d57b..d9010156f48f04fd37de9b0e96caf5b06cde979d 100644 (file)
@@ -189,26 +189,40 @@ public:
 
   // Get overall window size
   virtual void GetSize(int *width, int *height) const;
 
   // Get overall window size
   virtual void GetSize(int *width, int *height) const;
+  virtual wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
+  virtual wxRect GetRect() const { int w, h; int x, y; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
 
   // Get window position, relative to parent (or screen if no parent)
   virtual void GetPosition(int *x, int *y) const;
 
   // Get window position, relative to parent (or screen if no parent)
   virtual void GetPosition(int *x, int *y) const;
+  virtual wxPoint GetPosition() const { int x, y; GetPosition(&x, &y); return wxPoint(x, y); }
 
   // Get client (application-useable) size
   virtual void GetClientSize(int *width, int *height) const;
 
   // Get client (application-useable) size
   virtual void GetClientSize(int *width, int *height) const;
+  virtual wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
 
   // Set overall size and position
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
 
   // Set overall size and position
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
-  inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
-  inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
+  virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { SetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { SetSize(-1, -1, size.x, size.y, wxSIZE_USE_EXISTING); }
+
+  virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
+  virtual void Move(const wxPoint& pt) { SetSize(pt.x, pt.y, -1, -1, wxSIZE_USE_EXISTING); }
 
   // Set client size
   virtual void SetClientSize(int width, int size);
 
   // Set client size
   virtual void SetClientSize(int width, int size);
+  virtual void SetClientSize(const wxSize& sz) { SetClientSize(sz.x, sz.y); }
 
   // Convert client to screen coordinates
   virtual void ClientToScreen(int *x, int *y) const;
 
   // Convert client to screen coordinates
   virtual void ClientToScreen(int *x, int *y) const;
+  virtual wxPoint ClientToScreen(const wxPoint& pt) const
+    { int x = pt.x; int y = pt.y; ClientToScreen(& x, & y); return wxPoint(x, y); }
 
   // Convert screen to client coordinates
   virtual void ScreenToClient(int *x, int *y) const;
 
   // Convert screen to client coordinates
   virtual void ScreenToClient(int *x, int *y) const;
+  virtual wxPoint ScreenToClient(const wxPoint& pt) const
+    { int x = pt.x; int y = pt.y; ScreenToClient(& x, & y); return wxPoint(x, y); }
 
   // Set the focus to this window
   virtual void SetFocus();
 
   // Set the focus to this window
   virtual void SetFocus();
@@ -297,6 +311,8 @@ public:
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
   inline wxList *GetChildren() const;
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
   inline wxList *GetChildren() const;
+  // Reparents this window to have the new parent.
+  virtual bool Reparent(wxWindow* parent);
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
index 2f01821ed74846a1090cf734e8e4d7d8198eb6a3..e40cc207e271c3fa5e705b808d5bd774b41b2a57 100644 (file)
@@ -133,7 +133,7 @@ public:
 #if wxUSE_XPM_IN_MSW
   class wxItem;
   // Initialize with XPM data
 #if wxUSE_XPM_IN_MSW
   class wxItem;
   // Initialize with XPM data
-  wxBitmap(const char **data, wxItem *anItem = NULL);
+  wxBitmap(char **data, wxItem *anItem = NULL);
 #endif
 
   // Load a file or resource
 #endif
 
   // Load a file or resource
index 34e0824d6daf97e40151c26bf82ac8fbd448365f..12352beb399b8d9298a472a663276a804cc49387 100644 (file)
@@ -43,6 +43,10 @@ class WXDLLEXPORT wxButton: public wxControl
            const wxString& name = wxButtonNameStr);
 
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
            const wxString& name = wxButtonNameStr);
 
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   virtual void SetDefault(void);
   virtual void SetLabel(const wxString& label);
   virtual wxString GetLabel(void) const ;
   virtual void SetDefault(void);
   virtual void SetLabel(const wxString& label);
   virtual wxString GetLabel(void) const ;
index e5ddc460f6704b1128cdc716a216ba107f2c6834..f693730f5ca3afcc034e24a3063f7a5a4ff99f60 100644 (file)
@@ -45,6 +45,10 @@ class WXDLLEXPORT wxCheckBox: public wxControl
   virtual void SetValue(bool);
   virtual bool GetValue(void) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void SetValue(bool);
   virtual bool GetValue(void) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   virtual bool MSWCommand(WXUINT param, WXWORD id);
   virtual void SetLabel(const wxString& label);
   virtual void Command(wxCommandEvent& event);
   virtual bool MSWCommand(WXUINT param, WXWORD id);
   virtual void SetLabel(const wxString& label);
   virtual void Command(wxCommandEvent& event);
@@ -78,6 +82,10 @@ class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
   virtual void SetValue(bool);
   virtual bool GetValue(void) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void SetValue(bool);
   virtual bool GetValue(void) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   virtual void SetLabel(const wxBitmap *bitmap);
 };
 #endif
   virtual void SetLabel(const wxBitmap *bitmap);
 };
 #endif
index e3fd471b6dd24c71dbf65c09fefda66829709195..c7518c79b8e081470b9506b2a57450965373b3a0 100644 (file)
@@ -55,6 +55,9 @@ class WXDLLEXPORT wxChoice: public wxControl
   virtual int FindString(const wxString& s) const;
   virtual wxString GetString(int n) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual int FindString(const wxString& s) const;
   virtual wxString GetString(int n) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
   virtual wxString GetStringSelection(void) const ;
   virtual bool SetStringSelection(const wxString& sel);
 
   virtual wxString GetStringSelection(void) const ;
   virtual bool SetStringSelection(const wxString& sel);
 
index f6ab16ee18a5a0b172702c9a70e5984e0f273e6c..3738d445e0ce48655ca7ac473205509673fd9ddd 100644 (file)
@@ -32,6 +32,8 @@ public:
    virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
                                                                  // appropriate event handlers
    virtual void SetClientSize(int width, int height);
    virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
                                                                  // appropriate event handlers
    virtual void SetClientSize(int width, int height);
+   virtual void SetClientSize(const wxSize& sz) { wxWindow::SetClientSize(sz); }
+
    virtual void SetLabel(const wxString& label);
    virtual wxString GetLabel(void) const ;
 
    virtual void SetLabel(const wxString& label);
    virtual wxString GetLabel(void) const ;
 
index d4a19e94e83e1d69a9fb12d2f0b6c22d80ed71e7..b5026000399eaac41e01b166e8baa690317c96f7 100644 (file)
@@ -63,8 +63,16 @@ public:
 
   virtual bool Destroy(void);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
 
   virtual bool Destroy(void);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void SetClientSize(int width, int height);
   void SetClientSize(int width, int height);
+  void SetClientSize(const wxSize& sz) { wxWindow::SetClientSize(sz); }
+
   void GetPosition(int *x, int *y) const;
   void GetPosition(int *x, int *y) const;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
+
   bool Show(bool show);
   bool IsShown(void) const ;
   void Iconize(bool iconize);
   bool Show(bool show);
   bool IsShown(void) const ;
   void Iconize(bool iconize);
index 33dfa21c1d731431fa7c6a4626c9b2ef99ecfac0..68ca0aa7022d6774e74d7862998409542f2583d7 100644 (file)
@@ -54,14 +54,29 @@ public:
            const wxString& name = wxFrameNameStr);
 
   virtual bool Destroy(void);
            const wxString& name = wxFrameNameStr);
 
   virtual bool Destroy(void);
+
   void SetClientSize(int width, int height);
   void SetClientSize(int width, int height);
+  void SetClientSize(const wxSize& sz) { wxWindow::SetClientSize(sz); }
+
   void GetClientSize(int *width, int *height) const;
   void GetClientSize(int *width, int *height) const;
+  wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
 
   void GetSize(int *width, int *height) const ;
 
   void GetSize(int *width, int *height) const ;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void GetPosition(int *x, int *y) const ;
   void GetPosition(int *x, int *y) const ;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void ClientToScreen(int *x, int *y) const;
   void ClientToScreen(int *x, int *y) const;
+  wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); }
+
   void ScreenToClient(int *x, int *y) const;
   void ScreenToClient(int *x, int *y) const;
+  wxPoint ScreenToClient(const wxPoint& pt) const { return wxWindow::ScreenToClient(pt); }
 
   virtual bool OnClose(void);
 
 
   virtual bool OnClose(void);
 
index 362a7586549a9b476426360846e8d0b8893bcd22..99635c2669aa5e32b3272233c262e9364b4225bb 100644 (file)
@@ -65,6 +65,9 @@ class WXDLLEXPORT wxGauge95: public wxControl
 #endif
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
 #endif
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
 
 
   virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
 
index c3c5954ff4b4c2e256030d5a0d44e22acf31c760..b21b098c66962d0a713220656d1c250f4fc4b21a 100644 (file)
@@ -65,6 +65,9 @@ class WXDLLEXPORT wxGaugeMSW: public wxControl
 #endif
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
 #endif
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
 
 
   virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
 
index ac0efc056fbc51340a2fcbbf5707da80ed9d2d8c..f64c4741e2bc5d0b7fba025974c21af8e4fc4917 100644 (file)
@@ -101,6 +101,9 @@ class WXDLLEXPORT wxListBox: public wxControl
   virtual bool Selected(int n) const ;
   virtual wxString GetString(int n) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual bool Selected(int n) const ;
   virtual wxString GetString(int n) const ;
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   // Set the specified item at the first visible item
   // or scroll to max range.
 
   // Set the specified item at the first visible item
   // or scroll to max range.
index 658aa6c63d528da49c734879935b8fa15a012df7..35879cd3805aa08dfaec2c1c749b8b45605b2e90 100644 (file)
@@ -69,6 +69,7 @@ class WXDLLEXPORT wxMDIParentFrame: public wxFrame
   // and status bar size have been subtracted. If you want to manage your own
   // toolbar(s), don't call SetToolBar.
   void GetClientSize(int *width, int *height) const;
   // and status bar size have been subtracted. If you want to manage your own
   // toolbar(s), don't call SetToolBar.
   void GetClientSize(int *width, int *height) const;
+  wxSize GetClientSize() const { return wxWindow::GetClientSize(); }
 
   // Get the active MDI child window (Windows only)
   wxMDIChildFrame *GetActiveChild(void) const ;
 
   // Get the active MDI child window (Windows only)
   wxMDIChildFrame *GetActiveChild(void) const ;
@@ -146,8 +147,12 @@ class WXDLLEXPORT wxMDIChildFrame: public wxFrame
 
   // Set menu bar
   void SetMenuBar(wxMenuBar *menu_bar);
 
   // Set menu bar
   void SetMenuBar(wxMenuBar *menu_bar);
+
   void SetClientSize(int width, int height);
   void SetClientSize(int width, int height);
+  void SetClientSize(const wxSize& sz) { wxWindow::SetClientSize(sz); }
+
   void GetPosition(int *x, int *y) const ;
   void GetPosition(int *x, int *y) const ;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
 
   // MDI operations
   virtual void Maximize(void);
 
   // MDI operations
   virtual void Maximize(void);
index ba988b1022563703d8233da086116fa354e5356d..6d86bed7422c4d8ef8349387da1fd6e5abe41648 100644 (file)
@@ -93,9 +93,18 @@ public:
   void SetSelection(int N);
   int GetSelection(void) const;
   wxString GetString(int N) const;
   void SetSelection(int N);
   int GetSelection(void) const;
   wxString GetString(int N) const;
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void GetSize(int *x, int *y) const;
   void GetSize(int *x, int *y) const;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void GetPosition(int *x, int *y) const;
   void GetPosition(int *x, int *y) const;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
+
   wxString GetLabel(void) const;
   void SetLabel(const wxString& label);
   void SetLabel(int item, const wxString& label) ;
   wxString GetLabel(void) const;
   void SetLabel(const wxString& label);
   void SetLabel(int item, const wxString& label) ;
index cf461ecd593772d0031cb8e2798d80ae4def4f51..588d3d13218584955ed761d0d308af3938495b7b 100644 (file)
@@ -45,19 +45,19 @@ public:
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr);
 
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr);
 
-  int GetPosition(void) const ;
+  int GetThumbPosition(void) const ;
   inline int GetThumbSize() const { return m_pageSize; }
   inline int GetPageSize() const { return m_viewSize; }
   inline int GetRange() const { return m_objectSize; }
 
   inline int GetThumbSize() const { return m_pageSize; }
   inline int GetPageSize() const { return m_viewSize; }
   inline int GetRange() const { return m_objectSize; }
 
-  virtual void SetPosition(int viewStart);
+  virtual void SetThumbPosition(int viewStart);
   virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
     bool refresh = TRUE);
 
 #if WXWIN_COMPATIBILITY
   // Backward compatibility
   virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
     bool refresh = TRUE);
 
 #if WXWIN_COMPATIBILITY
   // Backward compatibility
-  inline int GetValue(void) const { return GetPosition(); }
-  inline void SetValue(int viewStart) { SetPosition(viewStart); }
+  inline int GetValue(void) const { return GetThumbPosition(); }
+  inline void SetValue(int viewStart) { SetThumbPosition(viewStart); }
   void GetValues(int *viewStart, int *viewLength, int *objectLength,
                  int *pageLength) const ;
   inline int GetViewLength() const { return m_viewSize; }
   void GetValues(int *viewStart, int *viewLength, int *objectLength,
                  int *pageLength) const ;
   inline int GetViewLength() const { return m_viewSize; }
index 1b96a7e26e70876578f1a765fe9ebf06da78146d..ba62f863905dc2d2ccbce72096268325f84e314e 100644 (file)
@@ -79,9 +79,7 @@
 #define wxUSE_SCROLLBAR   1
                                     // Define 1 to compile contributed wxScrollBar class
 #define wxUSE_XPM_IN_MSW  0
 #define wxUSE_SCROLLBAR   1
                                     // Define 1 to compile contributed wxScrollBar class
 #define wxUSE_XPM_IN_MSW  0
-                                    // Define 1 to support the XPM package in wxBitmap,
-                                    // separated by platform. If 1, you must link in
-                                    // the XPM library to your applications.
+                                    // Define 1 to support the XPM package in wxBitmap.
 #define wxUSE_IMAGE_LOADING_IN_MSW        1
                                   // Use dynamic DIB loading/saving code in utils/dib under MSW.
 #define wxUSE_RESOURCE_LOADING_IN_MSW     1
 #define wxUSE_IMAGE_LOADING_IN_MSW        1
                                   // Use dynamic DIB loading/saving code in utils/dib under MSW.
 #define wxUSE_RESOURCE_LOADING_IN_MSW     1
index ed8c6523c3b0e14088e1d717fd5efb6a1c850b85..d5adce947db1e4861e1406d8deb8f1b22e1eea36 100644 (file)
@@ -51,9 +51,18 @@ public:
 
   virtual int GetValue(void) const ;
   virtual void SetValue(int);
 
   virtual int GetValue(void) const ;
   virtual void SetValue(int);
+
   void GetSize(int *x, int *y) const ;
   void GetSize(int *x, int *y) const ;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void GetPosition(int *x, int *y) const ;
   void GetPosition(int *x, int *y) const ;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
+
   bool Show(bool show);
 
   void SetRange(int minValue, int maxValue);
   bool Show(bool show);
 
   void SetRange(int minValue, int maxValue);
index 8384086d1eed97827d4725102f3e483248cde557..9363bd4660ff36a11911de135327fd42384c6396 100644 (file)
@@ -51,9 +51,18 @@ public:
 
   virtual int GetValue(void) const ;
   virtual void SetValue(int);
 
   virtual int GetValue(void) const ;
   virtual void SetValue(int);
+
   void GetSize(int *x, int *y) const ;
   void GetSize(int *x, int *y) const ;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
+
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
+
   void GetPosition(int *x, int *y) const ;
   void GetPosition(int *x, int *y) const ;
+  wxPoint GetPosition() const { return wxWindow::GetPosition(); }
+
   bool Show(bool show);
 
   void SetRange(int minValue, int maxValue);
   bool Show(bool show);
 
   void SetRange(int minValue, int maxValue);
index b6aca08bb1496af6f16878f73c2d1bd361991d0b..e4b025397840e5318932882fd290fc8432e2f1a9 100644 (file)
@@ -49,6 +49,9 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
   virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
 
   inline wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
 
 
   inline wxBitmap& GetBitmap(void) const { return (wxBitmap&) m_messageBitmap; }
 
index 97e3722a703dc10386ab5bbe8c6e81bb598ad13f..3f15d25e376c77c04ea69ece248dd7e2e5c3d524 100644 (file)
@@ -52,6 +52,9 @@ class WXDLLEXPORT wxStaticBox: public wxControl
   virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
 
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
   void SetLabel(const wxString& label);
   virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
                        WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
   void SetLabel(const wxString& label);
   virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
                        WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
index dbb3646a0a6e375b9c2dd2020dac0eb1c60a25d1..432987cf5e9e3dcb3b5f48f96f10b117e622d7eb 100644 (file)
@@ -45,6 +45,9 @@ class WXDLLEXPORT wxStaticText: public wxControl
 
   // accessors
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
 
   // accessors
   void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
   void SetLabel(const wxString&);
 
   // operations
   void SetLabel(const wxString&);
 
   // operations
index 4aae20d62a95996b560705480e8ea5f13fd55b13..009e629290c6e2175ecdb1e8a0640feb7b854c48 100644 (file)
@@ -68,7 +68,9 @@ class WXDLLEXPORT wxToolBar95: public wxToolBarBase
   wxSize GetToolSize(void) const;
 
   wxSize GetMaxSize(void) const;
   wxSize GetToolSize(void) const;
 
   wxSize GetMaxSize(void) const;
+
   void GetSize(int *w, int *y) const;
   void GetSize(int *w, int *y) const;
+  wxSize GetSize() const { return wxWindow::GetSize(); }
 
   virtual bool GetToolState(int toolIndex) const;
 
 
   virtual bool GetToolState(int toolIndex) const;
 
index edc0de5b329c4bd979e5f3bc656d41516ae7f23c..5a3c475644e6cec5fb31fca9beb917617271184c 100644 (file)
@@ -81,6 +81,9 @@ public:
   // operations
   // ----------
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
   // operations
   // ----------
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
+  void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { wxWindow::SetSize(rect, sizeFlags); }
+  void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
   
   // Clipboard operations
   virtual void Copy();
   
   // Clipboard operations
   virtual void Copy();
index 66e3dfc9cec40e43e885a05fba6c2bab03c072a4..f688f4fe1d6fe31bbe1f0e24044307dce63519e0 100644 (file)
@@ -161,26 +161,40 @@ public:
 
   // Get overall window size
   virtual void GetSize(int *width, int *height) const;
 
   // Get overall window size
   virtual void GetSize(int *width, int *height) const;
+  virtual wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
+  virtual wxRect GetRect() const { int w, h; int x, y; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
 
   // Get window position, relative to parent (or screen if no parent)
   virtual void GetPosition(int *x, int *y) const;
 
   // Get window position, relative to parent (or screen if no parent)
   virtual void GetPosition(int *x, int *y) const;
+  virtual wxPoint GetPosition() const { int x, y; GetPosition(&x, &y); return wxPoint(x, y); }
 
   // Get client (application-useable) size
   virtual void GetClientSize(int *width, int *height) const;
 
   // Get client (application-useable) size
   virtual void GetClientSize(int *width, int *height) const;
+  virtual wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
 
   // Set overall size and position
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
 
   // Set overall size and position
   virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
-  inline virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
-  inline virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
+  virtual void SetSize(int width, int height) { SetSize(-1, -1, width, height, wxSIZE_USE_EXISTING); }
+  virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
+    { SetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); }
+  virtual void SetSize(const wxSize& size) { SetSize(-1, -1, size.x, size.y, wxSIZE_USE_EXISTING); }
+
+  virtual void Move(int x, int y) { SetSize(x, y, -1, -1, wxSIZE_USE_EXISTING); }
+  virtual void Move(const wxPoint& pt) { SetSize(pt.x, pt.y, -1, -1, wxSIZE_USE_EXISTING); }
 
   // Set client size
 
   // Set client size
-  virtual void SetClientSize(int width, int size);
+  virtual void SetClientSize(int width, int height);
+  virtual void SetClientSize(const wxSize& sz) { SetClientSize(sz.x, sz.y); }
 
   // Convert client to screen coordinates
   virtual void ClientToScreen(int *x, int *y) const;
 
   // Convert client to screen coordinates
   virtual void ClientToScreen(int *x, int *y) const;
+  virtual wxPoint ClientToScreen(const wxPoint& pt) const
+    { int x = pt.x; int y = pt.y; ClientToScreen(& x, & y); return wxPoint(x, y); }
 
   // Convert screen to client coordinates
   virtual void ScreenToClient(int *x, int *y) const;
 
   // Convert screen to client coordinates
   virtual void ScreenToClient(int *x, int *y) const;
+  virtual wxPoint ScreenToClient(const wxPoint& pt) const
+    { int x = pt.x; int y = pt.y; ScreenToClient(& x, & y); return wxPoint(x, y); }
 
   // Set the focus to this window
   virtual void SetFocus();
 
   // Set the focus to this window
   virtual void SetFocus();
@@ -274,6 +288,10 @@ public:
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
   inline wxList *GetChildren() const;
   inline void SetParent(wxWindow *p) ;
   inline wxWindow *GetGrandParent() const;
   inline wxList *GetChildren() const;
+  // Set this window to be the child of 'parent'.
+  // Returns FALSE it's not possible (some systems
+  // won't allow it)
+  virtual bool Reparent(wxWindow *parent);
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
 
   // Set/get the window's font
   virtual void SetFont(const wxFont& f);
index eeef6727c58be0b478ad068cae1d7a5cd5cf70de..3ec992e78ed1dd99aa3d6f16c8b1c7a6253890be 100644 (file)
@@ -45,12 +45,12 @@ public:
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr);
 
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxScrollBarNameStr);
 
-  int GetPosition() const ;
+  int GetThumbPosition() const ;
   inline int GetThumbSize() const { return m_pageSize; }
   inline int GetPageSize() const { return m_viewSize; }
   inline int GetRange() const { return m_objectSize; }
 
   inline int GetThumbSize() const { return m_pageSize; }
   inline int GetPageSize() const { return m_viewSize; }
   inline int GetRange() const { return m_objectSize; }
 
-  virtual void SetPosition(int viewStart);
+  virtual void SetThumbPosition(int viewStart);
   virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
     bool refresh = TRUE);
 
   virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
     bool refresh = TRUE);
 
index 6dac92b7d3438bb621a7149275af8b1c452fb3e9..0d198eb43e8fadc2f12abfa237c0a27cc00b875c 100644 (file)
 
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
 
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
-#include "wx/spinbutt.h"
 #endif
 
 #endif
 
+#include "wx/spinbutt.h"
 #include "wx/notebook.h"
 #include "wx/imaglist.h"
 
 #include "wx/notebook.h"
 #include "wx/imaglist.h"
 
+// XPM doesn't seem to work under Windows at present. Or, wxNotebook images
+// aren't working.
+// Uncomment this line and comment out the next to try it.
+// #if defined(__WXGTK__) || defined(__WXMOTIF__) || (defined(__WXMSW__) && wxUSE_XPM_IN_MSW)
 #if defined(__WXGTK__) || defined(__WXMOTIF__)
 #if defined(__WXGTK__) || defined(__WXMOTIF__)
+#define USE_XPM
+#endif
+
+#ifdef USE_XPM
 #include "mondrian.xpm"
 #include "icons/choice.xpm"
 #include "icons/combo.xpm"
 #include "mondrian.xpm"
 #include "icons/choice.xpm"
 #include "icons/combo.xpm"
@@ -143,49 +151,49 @@ bool MyApp::OnInit(void)
 // MyPanel
 //----------------------------------------------------------------------
 
 // MyPanel
 //----------------------------------------------------------------------
 
-const  ID_NOTEBOOK          = 1000;
+const int  ID_NOTEBOOK          = 1000;
 
 
-const  ID_LISTBOX           = 130;
-const  ID_LISTBOX_SEL_NUM   = 131;
-const  ID_LISTBOX_SEL_STR   = 132;
-const  ID_LISTBOX_CLEAR     = 133;
-const  ID_LISTBOX_APPEND    = 134;
-const  ID_LISTBOX_DELETE    = 135;
-const  ID_LISTBOX_FONT      = 136;
-const  ID_LISTBOX_ENABLE    = 137;
+const int  ID_LISTBOX           = 130;
+const int  ID_LISTBOX_SEL_NUM   = 131;
+const int  ID_LISTBOX_SEL_STR   = 132;
+const int  ID_LISTBOX_CLEAR     = 133;
+const int  ID_LISTBOX_APPEND    = 134;
+const int  ID_LISTBOX_DELETE    = 135;
+const int  ID_LISTBOX_FONT      = 136;
+const int  ID_LISTBOX_ENABLE    = 137;
 
 
-const  ID_CHOICE            = 120;
-const  ID_CHOICE_SEL_NUM    = 121;
-const  ID_CHOICE_SEL_STR    = 122;
-const  ID_CHOICE_CLEAR      = 123;
-const  ID_CHOICE_APPEND     = 124;
-const  ID_CHOICE_DELETE     = 125;
-const  ID_CHOICE_FONT       = 126;
-const  ID_CHOICE_ENABLE     = 127;
+const int  ID_CHOICE            = 120;
+const int  ID_CHOICE_SEL_NUM    = 121;
+const int  ID_CHOICE_SEL_STR    = 122;
+const int  ID_CHOICE_CLEAR      = 123;
+const int  ID_CHOICE_APPEND     = 124;
+const int  ID_CHOICE_DELETE     = 125;
+const int  ID_CHOICE_FONT       = 126;
+const int  ID_CHOICE_ENABLE     = 127;
 
 
-const  ID_COMBO             = 140;
-const  ID_COMBO_SEL_NUM     = 141;
-const  ID_COMBO_SEL_STR     = 142;
-const  ID_COMBO_CLEAR       = 143;
-const  ID_COMBO_APPEND      = 144;
-const  ID_COMBO_DELETE      = 145;
-const  ID_COMBO_FONT        = 146;
-const  ID_COMBO_ENABLE      = 147;
+const int  ID_COMBO             = 140;
+const int  ID_COMBO_SEL_NUM     = 141;
+const int  ID_COMBO_SEL_STR     = 142;
+const int  ID_COMBO_CLEAR       = 143;
+const int  ID_COMBO_APPEND      = 144;
+const int  ID_COMBO_DELETE      = 145;
+const int  ID_COMBO_FONT        = 146;
+const int  ID_COMBO_ENABLE      = 147;
 
 
-const  ID_TEXT              = 150;
+const int  ID_TEXT              = 150;
 
 
-const  ID_RADIOBOX          = 160;
-const  ID_RADIOBOX_SEL_NUM  = 161;
-const  ID_RADIOBOX_SEL_STR  = 162;
-const  ID_RADIOBOX_FONT     = 163;
-const  ID_RADIOBOX_ENABLE   = 164;
+const int  ID_RADIOBOX          = 160;
+const int  ID_RADIOBOX_SEL_NUM  = 161;
+const int  ID_RADIOBOX_SEL_STR  = 162;
+const int  ID_RADIOBOX_FONT     = 163;
+const int  ID_RADIOBOX_ENABLE   = 164;
 
 
-const  ID_SET_FONT          = 170;
+const int  ID_SET_FONT          = 170;
 
 
-const  ID_GAUGE             = 180;
-const  ID_SLIDER            = 181;
+const int  ID_GAUGE             = 180;
+const int  ID_SLIDER            = 181;
 
 
-const  ID_SPIN              = 182;
+const int  ID_SPIN              = 182;
 
 
 BEGIN_EVENT_TABLE(MyPanel, wxPanel)
 
 
 BEGIN_EVENT_TABLE(MyPanel, wxPanel)
@@ -244,6 +252,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
     "examples.",
   };
   
     "examples.",
   };
   
+#ifdef USE_XPM
   // image ids and names
   enum
   {
   // image ids and names
   enum
   {
@@ -251,35 +260,30 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
   };
   
   // fill the image list
   };
   
   // fill the image list
-#ifdef __WXMSW__
-  const char *aIconNames[] =
-  {
-    "list.xpm", "choice.xpm", "combo.xpm", "text.xpm", "radio.xpm", "gauge.txt"
-  };
-  
-  wxASSERT( WXSIZEOF(aIconNames) == Image_Max ); // keep in sync
-
-  wxString strIconDir = "icons/";
-  
-  wxImageList *imagelist = new wxImageList(32, 32);
-  for ( size_t n = 0; n < Image_Max; n++ ) 
-  {
-    imagelist->Add(wxBitmap(strIconDir + aIconNames[n]));
-  }
-#else
   wxImageList *imagelist = new wxImageList(32, 32);
   wxImageList *imagelist = new wxImageList(32, 32);
-  
+
   imagelist-> Add( wxBitmap( list_xpm ));
   imagelist-> Add( wxBitmap( choice_xpm ));
   imagelist-> Add( wxBitmap( combo_xpm ));
   imagelist-> Add( wxBitmap( text_xpm ));
   imagelist-> Add( wxBitmap( radio_xpm ));
   imagelist-> Add( wxBitmap( gauge_xpm ));
   imagelist-> Add( wxBitmap( list_xpm ));
   imagelist-> Add( wxBitmap( choice_xpm ));
   imagelist-> Add( wxBitmap( combo_xpm ));
   imagelist-> Add( wxBitmap( text_xpm ));
   imagelist-> Add( wxBitmap( radio_xpm ));
   imagelist-> Add( wxBitmap( gauge_xpm ));
+  m_notebook->SetImageList(imagelist);
+#else
+
+// No images for now
+#define    Image_List -1
+#define    Image_Choice -1
+#define    Image_Combo -1
+#define    Image_Text -1
+#define    Image_Radio -1
+#define    Image_Gauge -1
+#define    Image_Max -1
+
 #endif
 
   wxButton *button = (wxButton*)NULL;
 
 #endif
 
   wxButton *button = (wxButton*)NULL;
 
-  m_notebook->SetImageList(imagelist);
   m_notebook->SetBackgroundColour("cadet blue");
 
   wxPanel *panel = (wxPanel*) NULL;
   m_notebook->SetBackgroundColour("cadet blue");
 
   wxPanel *panel = (wxPanel*) NULL;
index 3fbaa26c99a269bef04556716885aa87c6ad9b40..f91d104547316426ba6d689926818584435941a2 100644 (file)
@@ -256,6 +256,8 @@ wxLog *wxLog::GetActiveTarget()
         // ask the application to create a log target for us
         if ( wxTheApp != NULL )
           ms_pLogger = wxTheApp->CreateLogTarget();
         // ask the application to create a log target for us
         if ( wxTheApp != NULL )
           ms_pLogger = wxTheApp->CreateLogTarget();
+        else
+          ms_pLogger = new wxLogStderr;
       #endif
 
       s_bInGetActiveTarget = FALSE;
       #endif
 
       s_bInGetActiveTarget = FALSE;
index 8f9b0d0ac3d9355974ea2966e008d993303ee124..602a295bb86ab892db61ad98cc9427621cc5f5e8 100644 (file)
@@ -902,11 +902,15 @@ int wxDebugContext::Check(bool checkAll)
 
 // Count the number of non-wxDebugContext-related objects
 // that are outstanding
 
 // Count the number of non-wxDebugContext-related objects
 // that are outstanding
-int wxDebugContext::CountObjectsLeft(void)
+int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint)
 {
   int n = 0;
 {
   int n = 0;
-    
-  wxMemStruct *from = wxDebugContext::GetHead ();
+
+  wxMemStruct *from = NULL;
+  if (sinceCheckpoint && checkPoint)
+    from = checkPoint->m_next;
+  if (from == (wxMemStruct*) NULL)
+    from = wxDebugContext::GetHead () ;
 
   for (wxMemStruct * st = from; st != 0; st = st->m_next)
   {
 
   for (wxMemStruct * st = from; st != 0; st = st->m_next)
   {
index e9e906d49bde49fbc5ef0bbc0fb6f7635dda3a6c..c4fdd0bb186d06e06ed891401abcdccf85168074 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
 #include <string.h>
 #include <stdlib.h>
 
+// This probably isn't right, what should it be Vadim?
+// Otherwise we end up with no wxVsprintf defined.
+#ifdef __WXMOTIF__
+#define HAVE_VPRINTF
+#endif
+
 #ifdef wxUSE_WCSRTOMBS
   #include <wchar.h>    // for wcsrtombs(), see comments where it's used
 #endif // GNU
 #ifdef wxUSE_WCSRTOMBS
   #include <wchar.h>    // for wcsrtombs(), see comments where it's used
 #endif // GNU
index 02fa4772739059b00a2f99665d15f07dec0241c2..e24b8a4b2b233f85e3ba7fd3bfcb932cd6a00bab 100644 (file)
@@ -768,6 +768,8 @@ wxVariant::wxVariant(const wxVariant& variant)
         m_data = (wxVariantData*) variant.GetData()->GetClassInfo()->CreateObject();
         variant.m_data->Copy(*m_data);
     }
         m_data = (wxVariantData*) variant.GetData()->GetClassInfo()->CreateObject();
         variant.m_data->Copy(*m_data);
     }
+    else
+        m_data = (wxVariantData*) NULL;
 }
 
 wxVariant::wxVariant(wxVariantData* data) // User-defined data
 }
 
 wxVariant::wxVariant(wxVariantData* data) // User-defined data
@@ -804,7 +806,8 @@ void wxVariant::operator= (const wxVariant& variant)
             delete m_data;
         m_data = (wxVariantData*) variant.GetData()->GetClassInfo()->CreateObject();
     }
             delete m_data;
         m_data = (wxVariantData*) variant.GetData()->GetClassInfo()->CreateObject();
     }
-    GetData()->Copy(* variant.GetData());
+//    GetData()->Copy(* variant.GetData());
+    variant.GetData()->Copy(* GetData());
 }
 
 // Assignment using data, e.g.
 }
 
 // Assignment using data, e.g.
index f1bc33d6df607fb86b569816416d14fb3288c658..2ae8945c956a07f1547f770ae59e2cf69972945a 100644 (file)
@@ -331,7 +331,7 @@ bool wxGenericGrid::CreateGrid(int nRows, int nCols, wxString **cellValues, shor
   m_hScrollBar->SetObjectLength(objectSizeX);
   m_hScrollBar->SetPageSize(pageSizeX);
 */
   m_hScrollBar->SetObjectLength(objectSizeX);
   m_hScrollBar->SetPageSize(pageSizeX);
 */
-  m_hScrollBar->SetScrollbar(m_hScrollBar->GetPosition(), pageSizeX, objectSizeX, viewLengthX);
+  m_hScrollBar->SetScrollbar(m_hScrollBar->GetThumbPosition(), pageSizeX, objectSizeX, viewLengthX);
 
   int objectSizeY = m_totalRows;
   int pageSizeY = 1;
 
   int objectSizeY = m_totalRows;
   int pageSizeY = 1;
@@ -343,7 +343,7 @@ bool wxGenericGrid::CreateGrid(int nRows, int nCols, wxString **cellValues, shor
   m_vScrollBar->SetPageSize(pageSizeY);
 */
 
   m_vScrollBar->SetPageSize(pageSizeY);
 */
 
-  m_vScrollBar->SetScrollbar(m_vScrollBar->GetPosition(), pageSizeY, objectSizeY, viewLengthY);
+  m_vScrollBar->SetScrollbar(m_vScrollBar->GetThumbPosition(), pageSizeY, objectSizeY, viewLengthY);
 
   AdjustScrollbars();
 
 
   AdjustScrollbars();
 
@@ -1027,7 +1027,7 @@ void wxGenericGrid::AdjustScrollbars(void)
   if (m_hScrollBar)
   {
     int nCols = GetCols();
   if (m_hScrollBar)
   {
     int nCols = GetCols();
-    m_hScrollBar->SetScrollbar(m_hScrollBar->GetPosition(), wxMax(noHorizSteps, 1), (noHorizSteps == 0) ? 1 : nCols, wxMax(noHorizSteps, 1));
+    m_hScrollBar->SetScrollbar(m_hScrollBar->GetThumbPosition(), wxMax(noHorizSteps, 1), (noHorizSteps == 0) ? 1 : nCols, wxMax(noHorizSteps, 1));
 
     m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth -2,
       cw - vertScrollBarWidth - m_leftOfSheet, m_scrollWidth);
 
     m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth -2,
       cw - vertScrollBarWidth - m_leftOfSheet, m_scrollWidth);
@@ -1037,7 +1037,7 @@ void wxGenericGrid::AdjustScrollbars(void)
   {
     int nRows = GetRows();
 
   {
     int nRows = GetRows();
 
-    m_vScrollBar->SetScrollbar(m_vScrollBar->GetPosition(), wxMax(noVertSteps, 1), (noVertSteps == 0) ? 1 : nRows, wxMax(noVertSteps, 1));
+    m_vScrollBar->SetScrollbar(m_vScrollBar->GetThumbPosition(), wxMax(noVertSteps, 1), (noVertSteps == 0) ? 1 : nRows, wxMax(noVertSteps, 1));
     m_vScrollBar->SetSize(cw - m_scrollWidth, m_topOfSheet,
        m_scrollWidth, ch - m_topOfSheet - horizScrollBarHeight);
   }
     m_vScrollBar->SetSize(cw - m_scrollWidth, m_topOfSheet,
        m_scrollWidth, ch - m_topOfSheet - horizScrollBarHeight);
   }
index b0987af6b366c37c405c5724acaccbdb4e4de1e6..32a9168bc2f4f2b420d6cd854009a82e549bdd45 100644 (file)
@@ -152,7 +152,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
   return TRUE;
 }
 
   return TRUE;
 }
 
-int wxScrollBar::GetPosition(void) const
+int wxScrollBar::GetThumbPosition(void) const
 {
   return (int)(m_adjust->value+0.5);
 }
 {
   return (int)(m_adjust->value+0.5);
 }
@@ -172,7 +172,7 @@ int wxScrollBar::GetRange() const
   return (int)(m_adjust->upper+0.5);
 }
 
   return (int)(m_adjust->upper+0.5);
 }
 
-void wxScrollBar::SetPosition( int viewStart )
+void wxScrollBar::SetThumbPosition( int viewStart )
 {
   if (m_isScrolling) return;
   
 {
   if (m_isScrolling) return;
   
@@ -196,7 +196,7 @@ void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int page
       (fabs(fthumb-m_adjust->page_size) < 0.2) &&
       (fabs(fpage-m_adjust->page_increment) < 0.2))
   {
       (fabs(fthumb-m_adjust->page_size) < 0.2) &&
       (fabs(fpage-m_adjust->page_increment) < 0.2))
   {
-    SetPosition( position );
+    SetThumbPosition( position );
     return;
   }
   
     return;
   }
   
@@ -215,12 +215,12 @@ void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int page
 // Backward compatibility
 int wxScrollBar::GetValue(void) const
 {
 // Backward compatibility
 int wxScrollBar::GetValue(void) const
 {
-  return GetPosition();
+  return GetThumbPosition();
 }
 
 void wxScrollBar::SetValue( int viewStart )
 {
 }
 
 void wxScrollBar::SetValue( int viewStart )
 {
-  SetPosition( viewStart );
+  SetThumbPosition( viewStart );
 }
 
 void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const
 }
 
 void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const
index b0987af6b366c37c405c5724acaccbdb4e4de1e6..32a9168bc2f4f2b420d6cd854009a82e549bdd45 100644 (file)
@@ -152,7 +152,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
   return TRUE;
 }
 
   return TRUE;
 }
 
-int wxScrollBar::GetPosition(void) const
+int wxScrollBar::GetThumbPosition(void) const
 {
   return (int)(m_adjust->value+0.5);
 }
 {
   return (int)(m_adjust->value+0.5);
 }
@@ -172,7 +172,7 @@ int wxScrollBar::GetRange() const
   return (int)(m_adjust->upper+0.5);
 }
 
   return (int)(m_adjust->upper+0.5);
 }
 
-void wxScrollBar::SetPosition( int viewStart )
+void wxScrollBar::SetThumbPosition( int viewStart )
 {
   if (m_isScrolling) return;
   
 {
   if (m_isScrolling) return;
   
@@ -196,7 +196,7 @@ void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int page
       (fabs(fthumb-m_adjust->page_size) < 0.2) &&
       (fabs(fpage-m_adjust->page_increment) < 0.2))
   {
       (fabs(fthumb-m_adjust->page_size) < 0.2) &&
       (fabs(fpage-m_adjust->page_increment) < 0.2))
   {
-    SetPosition( position );
+    SetThumbPosition( position );
     return;
   }
   
     return;
   }
   
@@ -215,12 +215,12 @@ void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int page
 // Backward compatibility
 int wxScrollBar::GetValue(void) const
 {
 // Backward compatibility
 int wxScrollBar::GetValue(void) const
 {
-  return GetPosition();
+  return GetThumbPosition();
 }
 
 void wxScrollBar::SetValue( int viewStart )
 {
 }
 
 void wxScrollBar::SetValue( int viewStart )
 {
-  SetPosition( viewStart );
+  SetThumbPosition( viewStart );
 }
 
 void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const
 }
 
 void wxScrollBar::GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength ) const
index e0f7726e4aefb33b1a9029955d3c31d2c85bd1da..1d34942d06d3adc8bc5d703549c750712575e7e7 100644 (file)
@@ -67,16 +67,6 @@ bool wxApp::Initialize()
     wxBuffer = new char[BUFSIZ + 512];
 #endif
 
     wxBuffer = new char[BUFSIZ + 512];
 #endif
 
-/* No longer used
-#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
-
-    streambuf* sBuf = new wxDebugStreamBuf;
-    ostream* oStr = new ostream(sBuf) ;
-    wxDebugContext::SetStream(oStr, sBuf);
-
-#endif
-*/
-  
     wxClassInfo::InitializeClasses();
 
     wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
     wxClassInfo::InitializeClasses();
 
     wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
@@ -161,13 +151,12 @@ void wxApp::CleanUp()
     // blocks that aren't part of the wxDebugContext itself,
     // as a special case. Then when dumping we need to ignore
     // wxDebugContext, too.
     // blocks that aren't part of the wxDebugContext itself,
     // as a special case. Then when dumping we need to ignore
     // wxDebugContext, too.
-    if (wxDebugContext::CountObjectsLeft() > 0)
+    if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
     {
       wxLogDebug("There were memory leaks.\n");
       wxDebugContext::Dump();
       wxDebugContext::PrintStatistics();
     }
     {
       wxLogDebug("There were memory leaks.\n");
       wxDebugContext::Dump();
       wxDebugContext::PrintStatistics();
     }
-//    wxDebugContext::SetStream(NULL, NULL);
 #endif
   
     // do it as the very last thing because everything else can log messages
 #endif
   
     // do it as the very last thing because everything else can log messages
@@ -178,8 +167,19 @@ void wxApp::CleanUp()
 
 int wxEntry( int argc, char *argv[] )
 {
 
 int wxEntry( int argc, char *argv[] )
 {
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+    // This seems to be necessary since there are 'rogue'
+    // objects present at this point (perhaps global objects?)
+    // Setting a checkpoint will ignore them as far as the
+    // memory checking facility is concerned.
+    // Of course you may argue that memory allocated in globals should be
+    // checked, but this is a reasonable compromise.
+    wxDebugContext::SetCheckpoint();
+#endif
+
     if (!wxApp::Initialize())
       return FALSE;
     if (!wxApp::Initialize())
       return FALSE;
+
     if (!wxTheApp)
     {
       if (!wxApp::GetInitializerFunction())
     if (!wxTheApp)
     {
       if (!wxApp::GetInitializerFunction())
@@ -210,11 +210,11 @@ int wxEntry( int argc, char *argv[] )
     // into wxTopLevelWindows by getting created
     // in OnInit().
   
     // into wxTopLevelWindows by getting created
     // in OnInit().
   
-    if (!wxTheApp->OnInit()) return 0;
-
     int retValue = 0;
     int retValue = 0;
-  
-    if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun();
+    if (wxTheApp->OnInit())
+    {
+      if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun();
+    }
 
     // flush the logged messages if any
     wxLog *pLog = wxLog::GetActiveTarget();
 
     // flush the logged messages if any
     wxLog *pLog = wxLog::GetActiveTarget();
@@ -233,7 +233,6 @@ int wxEntry( int argc, char *argv[] )
     wxTheApp->DeletePendingObjects();
   
     wxTheApp->OnExit();
     wxTheApp->DeletePendingObjects();
   
     wxTheApp->OnExit();
-
   
     wxApp::CleanUp();
 
   
     wxApp::CleanUp();
 
index 3d864f49d51758f739ba78b428e9caef5dd418b6..13fca3d66dab6ef20cb90df185344d679db913c8 100644 (file)
@@ -171,8 +171,8 @@ void wxListBox::Delete(int N)
   if (node) m_clientDataList.DeleteNode(node);    // if existed then delete from list
   node = m_clientDataList.First();                // we now have to adjust all keys that
   while (node)                                  // are >=N+1
   if (node) m_clientDataList.DeleteNode(node);    // if existed then delete from list
   node = m_clientDataList.First();                // we now have to adjust all keys that
   while (node)                                  // are >=N+1
-   { if (node->key.integer >= (long)(N+1))      // very ugly C++ wise but no other way 
-       node->key.integer--;                     // to look at or change key value
+   { if (node->GetKeyInteger() >= (long)(N+1))
+       node->SetKeyInteger(node->GetKeyInteger() - 1);
      node = node->Next();
    }
 
      node = node->Next();
    }
 
index 52ef32cc554021ffec4bc62730d65d956568bd37..10b670d40019b9a1d440bc8886bc4d429bb7e29c 100644 (file)
@@ -102,7 +102,7 @@ wxScrollBar::~wxScrollBar()
 {
 }
 
 {
 }
 
-void wxScrollBar::SetPosition(int pos)
+void wxScrollBar::SetThumbPosition(int pos)
 {
        if (m_mainWidget)
        {
 {
        if (m_mainWidget)
        {
@@ -112,7 +112,7 @@ void wxScrollBar::SetPosition(int pos)
        }
 }
 
        }
 }
 
-int wxScrollBar::GetPosition() const
+int wxScrollBar::GetThumbPosition() const
 {
        if (m_mainWidget)
        {
 {
        if (m_mainWidget)
        {
index 451b10f774b733d405c075514fac75003482ff0f..071f4f030b5816b427d309ebd82c249a4645ee44 100644 (file)
@@ -616,7 +616,7 @@ int wxToolBar::FindIndexForWidget(WXWidget w)
     {
         WXWidget widget = (WXWidget) node->Data();
         if (widget == w)
     {
         WXWidget widget = (WXWidget) node->Data();
         if (widget == w)
-            return (int) node->key.integer;
+            return (int) node->GetKeyInteger();
         node = node->Next();
     }
     return -1;
         node = node->Next();
     }
     return -1;
index 63278446f858afd35d26048e704549b8da8e63a9..07ac707905be836252cf5cc8d3a065b422a54b0d 100644 (file)
@@ -275,7 +275,7 @@ wxFlushResources (void)
   wxNode *node = wxResourceCache.First ();
   while (node)
     {
   wxNode *node = wxResourceCache.First ();
   while (node)
     {
-      char *file = node->key.string;
+      const char *file = node->GetKeyString();
       // If file doesn't exist, create it first.
       (void)GetResourcePath(nameBuffer, file, TRUE);
 
       // If file doesn't exist, create it first.
       (void)GetResourcePath(nameBuffer, file, TRUE);
 
index 7863f36b76574ce4247acb2fa8d733ac221a5c26..58aaf97fe9ace1968df3a1b0939a4892ca27298c 100644 (file)
@@ -1320,6 +1320,16 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
     node = node->Next();
 
   }
     node = node->Next();
 
   }
+
+  // Delete the update rects
+  node = updateRects.First();
+  while (node)
+  {
+    wxRect* rect = (wxRect*) node->Data();
+    delete rect;
+    node = node->Next();
+  }
+
 }
 
 void wxWindow::OnChar(wxKeyEvent& event)
 }
 
 void wxWindow::OnChar(wxKeyEvent& event)
@@ -1427,6 +1437,13 @@ void wxWindow::RemoveChild(wxWindow *child)
     child->m_windowParent = NULL;
 }
 
     child->m_windowParent = NULL;
 }
 
+// Reparents this window to have the new parent.
+bool wxWindow::Reparent(wxWindow* WXUNUSED(parent))
+{
+    // For now, we indicate that this isn't implemented.
+    return FALSE;
+}
+
 void wxWindow::DestroyChildren()
 {
   if (GetChildren())
 void wxWindow::DestroyChildren()
 {
   if (GetChildren())
index 67d698f32b182c34b06d7bf358b8b965212f2a60..5847586476d82d4b22690562f1106c118e491e20 100644 (file)
@@ -38,7 +38,7 @@
 
 #if wxUSE_XPM_IN_MSW
 #define FOR_MSW 1
 
 #if wxUSE_XPM_IN_MSW
 #define FOR_MSW 1
-#include "../../contrib/wxxpm/libxpm.34b/lib/xpm34.h"
+#include "../src/xpm/xpm34.h"
 #endif
 
 #include "wx/msw/dib.h"
 #endif
 
 #include "wx/msw/dib.h"
@@ -170,7 +170,7 @@ wxBitmap::wxBitmap(const wxString& filename, long type)
 
 #if wxUSE_XPM_IN_MSW
 // Create from data
 
 #if wxUSE_XPM_IN_MSW
 // Create from data
-wxBitmap::wxBitmap(const char **data, wxItem *WXUNUSED(anItem))
+wxBitmap::wxBitmap(char **data, wxItem *WXUNUSED(anItem))
 {
   (void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
 }
 {
   (void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
 }
index 3a3c09aa70eb31a19158f472599456ac7716a60c..144c728fae3e603297a54bb18cbb9a19fb8ed2c5 100644 (file)
@@ -36,7 +36,7 @@
 
 #if wxUSE_XPM_IN_MSW
 #define FOR_MSW 1
 
 #if wxUSE_XPM_IN_MSW
 #define FOR_MSW 1
-#include "..\..\contrib\wxxpm\libxpm.34b\lib\xpm34.h"
+#include "../src/xpm/xpm34.h"
 #endif
 
 #if wxUSE_RESOURCE_LOADING_IN_MSW
 #endif
 
 #if wxUSE_RESOURCE_LOADING_IN_MSW
index 17d2703d59607ca727dfcdfa8ab9540c9871d520..bd69394f9a21e85d5b88ecbce64dce13e4d0fa56 100644 (file)
@@ -34,7 +34,7 @@
 
 #if wxUSE_XPM_IN_MSW
 #define FOR_MSW 1
 
 #if wxUSE_XPM_IN_MSW
 #define FOR_MSW 1
-#include "..\..\contrib\wxxpm\libxpm.34b\lib\xpm34.h"
+#include "../src/xpm/xpm34.h"
 #endif
 
 #if wxUSE_RESOURCE_LOADING_IN_MSW
 #endif
 
 #if wxUSE_RESOURCE_LOADING_IN_MSW
index eb06cd8071786ecf58ee4052b02bb8fc1d6ee18b..db437e0f3e1601f0d4fdeed12f6d79856ab696d7 100644 (file)
@@ -49,6 +49,7 @@ EXTRAOBJS=
 
 GENDIR=../generic
 COMMDIR=../common
 
 GENDIR=../generic
 COMMDIR=../common
+XPMDIR=../xpm
 OLEDIR=ole
 MSWDIR=.
 
 OLEDIR=ole
 MSWDIR=.
 
@@ -123,21 +124,22 @@ COMMONOBJS = \
   $(COMMDIR)/datstrm.$(OBJSUFF) \
   $(COMMDIR)/objstrm.$(OBJSUFF) \
   $(COMMDIR)/extended.$(OBJSUFF) \
   $(COMMDIR)/datstrm.$(OBJSUFF) \
   $(COMMDIR)/objstrm.$(OBJSUFF) \
   $(COMMDIR)/extended.$(OBJSUFF) \
-  $(COMMDIR)/socket.$(OBJSUFF) \
-  $(COMMDIR)/sckaddr.$(OBJSUFF) \
-  $(COMMDIR)/sckfile.$(OBJSUFF) \
-  $(COMMDIR)/sckipc.$(OBJSUFF) \
-  $(COMMDIR)/sckstrm.$(OBJSUFF) \
-  $(COMMDIR)/protocol.$(OBJSUFF) \
-  $(COMMDIR)/http.$(OBJSUFF) \
-  $(COMMDIR)/ftp.$(OBJSUFF) \
-  $(COMMDIR)/url.$(OBJSUFF) \
   $(COMMDIR)/wincmn.$(OBJSUFF)
 
 #  $(COMMDIR)/postscrp.$(OBJSUFF) \
 
   $(COMMDIR)/wincmn.$(OBJSUFF)
 
 #  $(COMMDIR)/postscrp.$(OBJSUFF) \
 
-# NOTE: if the socket-related files above fail with a syntax error in Sockets.h,
-# remove the files (probably all GnuWin32 releases < b20).
+# NOTE: if the socket-related files fail with a syntax error in Sockets.h,
+# remove the files (probably all GnuWin32 releases < b20). Cygwin b20 is OK,
+# Mingw32 may still have problems.
+#  $(COMMDIR)/socket.$(OBJSUFF) \
+#  $(COMMDIR)/sckaddr.$(OBJSUFF) \
+#  $(COMMDIR)/sckfile.$(OBJSUFF) \
+#  $(COMMDIR)/sckipc.$(OBJSUFF) \
+#  $(COMMDIR)/sckstrm.$(OBJSUFF) \
+#  $(COMMDIR)/protocol.$(OBJSUFF) \
+#  $(COMMDIR)/http.$(OBJSUFF) \
+#  $(COMMDIR)/ftp.$(OBJSUFF) \
+#  $(COMMDIR)/url.$(OBJSUFF) \
 
 MSWOBJS = \
   accel.$(OBJSUFF) \
 
 MSWOBJS = \
   accel.$(OBJSUFF) \
@@ -228,8 +230,19 @@ MSWOBJS = \
 #  $(OLEDIR)/oleutils.$(OBJSUFF) \
 #  $(OLEDIR)/uuid.$(OBJSUFF)
 
 #  $(OLEDIR)/oleutils.$(OBJSUFF) \
 #  $(OLEDIR)/uuid.$(OBJSUFF)
 
-
-OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS)
+XPMOBJECTS =   $(XPMDIR)/crbuffri.o\
+               $(XPMDIR)/crdatfri.o\
+               $(XPMDIR)/create.o $(XPMDIR)/crifrbuf.o\
+               $(XPMDIR)/crifrdat.o\
+               $(XPMDIR)/data.o\
+               $(XPMDIR)/hashtab.o $(XPMDIR)/misc.o\
+               $(XPMDIR)/parse.o $(XPMDIR)/rdftodat.o\
+               $(XPMDIR)/rdftoi.o\
+               $(XPMDIR)/rgb.o $(XPMDIR)/scan.o\
+               $(XPMDIR)/simx.o $(XPMDIR)/wrffrdat.o\
+               $(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o
+
+OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) # $(XPMOBJECTS)
 
 all:    $(OBJECTS) $(WXLIB)
 
 
 all:    $(OBJECTS) $(WXLIB)
 
index efc18040c894c1b529d81204ce1fe0f24d16e58a..36bbc16889ed9f67bf64aec03f98aeb08e540442 100644 (file)
@@ -32,28 +32,17 @@ DUMMYOBJ=dummy.obj
 # This one overrides the others, to be consistent with the settings in wx_setup.h
 MINIMAL_WXWINDOWS_SETUP=0
 
 # This one overrides the others, to be consistent with the settings in wx_setup.h
 MINIMAL_WXWINDOWS_SETUP=0
 
-USE_XPM_IN_MSW=0
-
-!if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
-USE_XPM_IN_MSW=0
-!endif
-
 PERIPH_LIBS=
 PERIPH_TARGET=
 PERIPH_CLEAN_TARGET=
 
 PERIPH_LIBS=
 PERIPH_TARGET=
 PERIPH_CLEAN_TARGET=
 
-!if "$(USE_XPM_IN_MSW)" == "1"
-PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
-PERIPH_TARGET=xpm $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
-!endif
-
 # These are absolute paths, so that the compiler
 # generates correct __FILE__ symbols for debugging.
 # Otherwise you don't be able to double-click on a memory
 # error to load that file.
 GENDIR=$(WXDIR)\src\generic
 COMMDIR=$(WXDIR)\src\common
 # These are absolute paths, so that the compiler
 # generates correct __FILE__ symbols for debugging.
 # Otherwise you don't be able to double-click on a memory
 # error to load that file.
 GENDIR=$(WXDIR)\src\generic
 COMMDIR=$(WXDIR)\src\common
+XPMDIR=$(WXDIR)\src\xpm
 OLEDIR=ole
 MSWDIR=$(WXDIR)\src\msw
 
 OLEDIR=ole
 MSWDIR=$(WXDIR)\src\msw
 
@@ -232,9 +221,20 @@ MSWOBJS = \
   $(OLEDIR)\oleutils.obj \
   $(OLEDIR)\uuid.obj
 
   $(OLEDIR)\oleutils.obj \
   $(OLEDIR)\uuid.obj
 
+XPMOBJECTS =   $(XPMDIR)\crbuffri.obj\
+               $(XPMDIR)\crdatfri.obj\
+               $(XPMDIR)\create.obj $(XPMDIR)\crifrbuf.obj\
+               $(XPMDIR)\crifrdat.obj\
+               $(XPMDIR)\data.obj\
+               $(XPMDIR)\hashtab.obj $(XPMDIR)\misc.obj\
+               $(XPMDIR)\parse.obj $(XPMDIR)\rdftodat.obj\
+               $(XPMDIR)\rdftoi.obj\
+               $(XPMDIR)\rgb.obj $(XPMDIR)\scan.obj\
+               $(XPMDIR)\simx.obj $(XPMDIR)\wrffrdat.obj\
+               $(XPMDIR)\wrffrp.obj $(XPMDIR)\wrffri.obj
 
 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
 
 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
-OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) # $(XPMOBJECTS)
 
 # Normal, static library
 all:    $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib $(LIBTARGET)
 
 # Normal, static library
 all:    $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib $(LIBTARGET)
@@ -1142,10 +1142,117 @@ $(GENDIR)/textdlgg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
-#test: $(DUMMYOBJ) $(COMMDIR)/string.obj
+$(OBJECTS):    $(WXDIR)/include/wx/setup.h
 
 
+$(XPMDIR)\crbuffri.obj: $(XPMDIR)\crbuffri.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
 
 
-$(OBJECTS):    $(WXDIR)/include/wx/setup.h
+$(XPMDIR)\crbuffrp.obj: $(XPMDIR)\crbuffrp.c
+               cl @<<
+$(CPPFLAGS2) /c  $*.c /Fo$@
+<<
+
+$(XPMDIR)\crdatfri.obj: $(XPMDIR)\crdatfri.c
+               cl @<<
+$(CPPFLAGS2) /c  $*.c /Fo$@
+<<
+
+$(XPMDIR)\crdatfrp.obj: $(XPMDIR)\crdatfrp.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\create.obj: $(XPMDIR)\create.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\crifrbuf.obj: $(XPMDIR)\crifrbuf.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\crifrdat.obj: $(XPMDIR)\crifrdat.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\crpfrbuf.obj: $(XPMDIR)\crpfrbuf.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\crpfrdat.obj: $(XPMDIR)\crpfrdat.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\data.obj: $(XPMDIR)\data.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\hashtab.obj: $(XPMDIR)\hashtab.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\misc.obj: $(XPMDIR)\misc.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\parse.obj: $(XPMDIR)\parse.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\rdftodat.obj: $(XPMDIR)\rdftodat.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\rdftoi.obj: $(XPMDIR)\rdftoi.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\rdftop.obj: $(XPMDIR)\rdftop.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\rgb.obj: $(XPMDIR)\rgb.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\scan.obj: $(XPMDIR)\scan.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\simx.obj: $(XPMDIR)\simx.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\wrffrdat.obj: $(XPMDIR)\wrffrdat.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\wrffri.obj: $(XPMDIR)\wrffri.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
+
+$(XPMDIR)\wrffrp.obj: $(XPMDIR)\wrffrp.c
+               cl @<<
+$(CPPFLAGS2) /c $*.c /Fo$@
+<<
 
 # Peripheral components
 
 
 # Peripheral components
 
index a34df24e6eaf6fb59d19c4955a915a111dab4457..d111e085639bde4a89a86b0b02eae46d6945c72b 100644 (file)
@@ -196,7 +196,7 @@ void wxScrollBar::MSWOnHScroll(WXWORD wParam, WXWORD pos, WXHWND control)
        MSWOnVScroll(wParam, pos, control);
 }
 
        MSWOnVScroll(wParam, pos, control);
 }
 
-void wxScrollBar::SetPosition(int viewStart)
+void wxScrollBar::SetThumbPosition(int viewStart)
 {
 #if defined(__WIN95__)
   SCROLLINFO info;
 {
 #if defined(__WIN95__)
   SCROLLINFO info;
@@ -212,7 +212,7 @@ void wxScrollBar::SetPosition(int viewStart)
 #endif
 }
 
 #endif
 }
 
-int wxScrollBar::GetPosition(void) const
+int wxScrollBar::GetThumbPosition(void) const
 {
     return ::GetScrollPos((HWND)m_hWnd, SB_CTL);
 }
 {
     return ::GetScrollPos((HWND)m_hWnd, SB_CTL);
 }
index 210c08d785cf788fc3570d7b214a6430acca6f0e..623a803942f85241c81b909f53fff6481ad749f9 100644 (file)
@@ -937,6 +937,22 @@ WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
 
 void wxTextCtrl::OnChar(wxKeyEvent& event)
 {
 
 void wxTextCtrl::OnChar(wxKeyEvent& event)
 {
+    // Fix by Marcel Rasche to allow Alt-Ctrl insertion of special characters
+  switch(event.KeyCode())
+  {
+  case '{':
+  case '}':
+  case '[':
+  case ']':
+  case '|':
+  case '~':
+  case '\\':
+   {
+    char c=(char)event.KeyCode();
+    *this << c;
+   }
+   break;
+  }
   if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
   {
     wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
   if ( (event.KeyCode() == WXK_RETURN) && (m_windowStyle & wxPROCESS_ENTER))
   {
     wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
index 7a5c6af4f2bc5876966a5686ce16081e1000d36c..496e1f38631cb8d4f5eaefef1f549c20b6d92130 100644 (file)
@@ -490,7 +490,7 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent,
 
     tvIns.item.mask = mask;
 
 
     tvIns.item.mask = mask;
 
-    HTREEITEM id = TreeView_InsertItem(wxhWnd, &tvIns);
+    HTREEITEM id = (HTREEITEM) TreeView_InsertItem(wxhWnd, &tvIns);
     if ( id == 0 )
     {
         wxLogLastError("TreeView_InsertItem");
     if ( id == 0 )
     {
         wxLogLastError("TreeView_InsertItem");
@@ -740,6 +740,12 @@ void wxTreeCtrl::SortChildren(const wxTreeItemId& item,
     }
 }
 
     }
 }
 
+// TODO
+size_t wxTreeCtrl::GetChildrenCount(const wxTreeItemId& item, bool recursively)
+{
+    return 0;
+}
+
 // ----------------------------------------------------------------------------
 // implementation
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // implementation
 // ----------------------------------------------------------------------------
index 65ffdccfe91d8f657212c7b9fb63b355f5b73c18..32eb0c46bf6e6d655de709bff5303fc0fc856594 100644 (file)
@@ -4342,6 +4342,35 @@ bool wxWindow::IsExposed(const wxRect& rect) const
     return (m_updateRegion.Contains(rect) != wxOutRegion);
 }
 
     return (m_updateRegion.Contains(rect) != wxOutRegion);
 }
 
+// Set this window to be the child of 'parent'.
+bool wxWindow::Reparent(wxWindow *parent)
+{
+    if (parent == GetParent())
+        return TRUE;
+
+    // Unlink this window from the existing parent.
+    if (GetParent())
+    {
+        GetParent()->RemoveChild(this);
+    }
+    else
+        wxTopLevelWindows.DeleteObject(this);
+
+    HWND hWndParent = 0;
+    HWND hWndChild = (HWND) GetHWND();
+    if (parent != (wxWindow*) NULL)
+    {
+        parent->AddChild(this);
+        hWndParent = (HWND) parent->GetHWND();
+    }
+    else
+        wxTopLevelWindows.Append(this);
+
+    ::SetParent(hWndChild, hWndParent);
+
+    return TRUE;
+}
+
 #ifdef __WXDEBUG__
 const char *wxGetMessageName(int message)
 {
 #ifdef __WXDEBUG__
 const char *wxGetMessageName(int message)
 {
index 307cdefc136adefd37a569261bf1275902475c10..a60274815789bda87effaf4feed9a4a4fac7c600 100644 (file)
@@ -48,12 +48,12 @@ wxScrollBar::~wxScrollBar()
 {
 }
 
 {
 }
 
-void wxScrollBar::SetPosition(int viewStart)
+void wxScrollBar::SetThumbPosition(int viewStart)
 {
     // TODO
 }
 
 {
     // TODO
 }
 
-int wxScrollBar::GetPosition() const
+int wxScrollBar::GetThumbPosition() const
 {
     // TODO
     return 0;
 {
     // TODO
     return 0;