MSW and source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -13,7 +13,7 @@
|
||||
#define _WX_PALMOS_APPTBASE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAppTraits: the MSW version adds extra hooks needed by MSW-only code
|
||||
// wxAppTraits
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_APPTRAIT_H_
|
||||
#define _WX_MSW_APPTRAIT_H_
|
||||
#ifndef _WX_PALM_APPTRAIT_H_
|
||||
#define _WX_PALM_APPTRAIT_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
|
||||
@@ -41,5 +41,5 @@ public:
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif // _WX_MSW_APPTRAIT_H_
|
||||
#endif // _WX_PALM_APPTRAIT_H_
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -49,14 +49,13 @@ public:
|
||||
|
||||
// Implementation
|
||||
virtual void SetDefault();
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
|
||||
virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
|
||||
};
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
wxListCtrl() { Init(); }
|
||||
|
||||
wxListCtrl(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
virtual ~wxListCtrl();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
long GetTopItem() const ;
|
||||
|
||||
// Add or remove a single window style
|
||||
void SetSingleStyle(long style, bool add = TRUE) ;
|
||||
void SetSingleStyle(long style, bool add = true) ;
|
||||
|
||||
// Set the whole window style
|
||||
void SetWindowStyleFlag(long style) ;
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
|
||||
// Find an item whose label matches this string, starting from the item after 'start'
|
||||
// or the beginning if 'start' is -1.
|
||||
long FindItem(long start, const wxString& str, bool partial = FALSE);
|
||||
long FindItem(long start, const wxString& str, bool partial = false);
|
||||
|
||||
// Find an item whose data matches this data, starting from the item after 'start'
|
||||
// or the beginning if 'start' is -1.
|
||||
@@ -338,10 +338,6 @@ public:
|
||||
// data is arbitrary data to be passed to the sort function.
|
||||
bool SortItems(wxListCtrlCompare fn, long data);
|
||||
|
||||
// IMPLEMENTATION
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||
|
||||
// bring the control in sync with current m_windowStyle value
|
||||
void UpdateStyle();
|
||||
|
||||
@@ -372,10 +368,6 @@ protected:
|
||||
// free memory taken by all internal data
|
||||
void FreeAllInternalData();
|
||||
|
||||
// convert our styles to Windows
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
|
||||
wxTextCtrl* m_textCtrl; // The control used for editing a label
|
||||
wxImageList * m_imageListNormal; // The image list for normal icons
|
||||
wxImageList * m_imageListSmall; // The image list for small icons
|
||||
@@ -390,10 +382,10 @@ protected:
|
||||
// ListView_GetItemCount
|
||||
bool m_ignoreChangeMessages;
|
||||
|
||||
// TRUE if we have any internal data (user data & attributes)
|
||||
// true if we have any internal data (user data & attributes)
|
||||
bool m_AnyInternalData;
|
||||
|
||||
// TRUE if we have any items with custom attributes
|
||||
// true if we have any items with custom attributes
|
||||
bool m_hasAnyAttr;
|
||||
|
||||
// these functions are only used for virtual list view controls, i.e. the
|
||||
|
@@ -26,7 +26,7 @@ public:
|
||||
wxSpinButton() { }
|
||||
|
||||
wxSpinButton(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
virtual ~wxSpinButton();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
||||
@@ -50,14 +50,8 @@ public:
|
||||
virtual void SetValue(int val);
|
||||
virtual void SetRange(int minVal, int maxVal);
|
||||
|
||||
// implementation
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
||||
WXWORD pos, WXHWND control);
|
||||
|
||||
// a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: William Osborne
|
||||
// Modified by:
|
||||
// Created: 10/13/04
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) William Osborne
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
// --------
|
||||
wxTreeCtrl() { Init(); }
|
||||
|
||||
wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
|
||||
wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
virtual ~wxTreeCtrl();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
|
||||
@@ -101,7 +101,6 @@ public:
|
||||
void SetIndent(unsigned int indent);
|
||||
|
||||
// spacing is the number of pixels between the start and the Text
|
||||
// not implemented under wxMSW
|
||||
unsigned int GetSpacing() const { return 18; } // return wxGTK default
|
||||
void SetSpacing(unsigned int WXUNUSED(spacing)) { }
|
||||
|
||||
@@ -163,13 +162,13 @@ public:
|
||||
// allow the user to expand the items which don't have any children now
|
||||
// - but instead add them only when needed, thus minimizing memory
|
||||
// usage and loading time.
|
||||
void SetItemHasChildren(const wxTreeItemId& item, bool has = TRUE);
|
||||
void SetItemHasChildren(const wxTreeItemId& item, bool has = true);
|
||||
|
||||
// the item will be shown in bold
|
||||
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
|
||||
void SetItemBold(const wxTreeItemId& item, bool bold = true);
|
||||
|
||||
// the item will be shown with a drop highlight
|
||||
void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = TRUE);
|
||||
void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true);
|
||||
|
||||
// set the items text colour
|
||||
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
|
||||
@@ -197,15 +196,15 @@ public:
|
||||
// number of children
|
||||
// ------------------
|
||||
|
||||
// if 'recursively' is FALSE, only immediate children count, otherwise
|
||||
// if 'recursively' is false, only immediate children count, otherwise
|
||||
// the returned number is the number of all items in this branch
|
||||
size_t GetChildrenCount(const wxTreeItemId& item,
|
||||
bool recursively = TRUE) const;
|
||||
bool recursively = true) const;
|
||||
|
||||
// navigation
|
||||
// ----------
|
||||
|
||||
// wxTreeItemId.IsOk() will return FALSE if there is no such item
|
||||
// wxTreeItemId.IsOk() will return false if there is no such item
|
||||
|
||||
// get the root tree item
|
||||
wxTreeItemId GetRootItem() const;
|
||||
@@ -340,7 +339,7 @@ public:
|
||||
// edited simultaneously)
|
||||
wxTextCtrl* GetEditControl() const;
|
||||
// end editing and accept or discard the changes to item label
|
||||
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE);
|
||||
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false);
|
||||
|
||||
// sorting
|
||||
// this function is called to compare 2 items and should return -1, 0
|
||||
@@ -371,7 +370,7 @@ public:
|
||||
// get the bounding rectangle of the item (or of its label only)
|
||||
bool GetBoundingRect(const wxTreeItemId& item,
|
||||
wxRect& rect,
|
||||
bool textOnly = FALSE) const;
|
||||
bool textOnly = false) const;
|
||||
|
||||
// deprecated
|
||||
// ----------
|
||||
@@ -422,18 +421,13 @@ public:
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||
|
||||
// override some base class virtuals
|
||||
virtual bool SetBackgroundColour(const wxColour &colour);
|
||||
virtual bool SetForegroundColour(const wxColour &colour);
|
||||
|
||||
// get/set the check state for the item (only for wxTR_MULTIPLE)
|
||||
bool IsItemChecked(const wxTreeItemId& item) const;
|
||||
void SetItemCheck(const wxTreeItemId& item, bool check = TRUE);
|
||||
void SetItemCheck(const wxTreeItemId& item, bool check = true);
|
||||
|
||||
// set/get the item state.image (state == -1 means cycle to the next one)
|
||||
void SetState(const wxTreeItemId& node, int state);
|
||||
@@ -487,7 +481,7 @@ private:
|
||||
// the hash storing the items attributes (indexed by item ids)
|
||||
wxMapTreeAttr m_attrs;
|
||||
|
||||
// TRUE if the hash above is not empty
|
||||
// true if the hash above is not empty
|
||||
bool m_hasAnyAttr;
|
||||
|
||||
// used for dragging
|
||||
|
Reference in New Issue
Block a user