// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#define _WX_PALMOS_APPTBASE_H_
// ----------------------------------------------------------------------------
-// wxAppTraits: the MSW version adds extra hooks needed by MSW-only code
+// wxAppTraits
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
// 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
#endif // wxUSE_GUI
-#endif // _WX_MSW_APPTRAIT_H_
+#endif // _WX_PALM_APPTRAIT_H_
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// 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)
};
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
wxListCtrl() { Init(); }
wxListCtrl(wxWindow *parent,
- wxWindowID id = -1,
+ wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_ICON,
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,
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) ;
// 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.
// 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();
// 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
// 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
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,
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,
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;
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// --------
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,
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,
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)) { }
// 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);
// 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;
// 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
// 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
// ----------
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);
// 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
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
#define FOCUS_MARGIN 3
-bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item)
-{
- return true;
-}
-
void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
int right, int bottom, bool sel )
{
// Author: William Osborne
// Modified by:
// Created: 10.13.04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/settings.h"
#endif
-#include "wx/msw/private.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/frame.h"
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_HELP
#include "wx/filefn.h"
-#include "wx/msw/helpwin.h"
#include <time.h>
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxListCtrl)
- wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
+ wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxListCtrl)
wxEND_HANDLERS_TABLE()
-wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
+wxCONSTRUCTOR_5( wxListCtrl , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
/*
TODO : Expose more information of a list's layout etc. via appropriate objects (à la NotebookPageInfo)
return false;
}
-WXDWORD wxListCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
-{
- return 0;
-}
-
void wxListCtrl::UpdateStyle()
{
}
// End label editing, optionally cancelling the edit
bool wxListCtrl::EndEditLabel(bool WXUNUSED(cancel))
{
- return FALSE;
+ return false;
}
// Ensures this item is visible
// in a wxListItemInternalData structure refernced by the actual lParam
long wxListCtrl::FindItem(long start, long data)
{
- return -1;
+ return wxNOT_FOUND;
}
// Find an item nearest this position in the specified direction, starting from
// the item after 'start' or the beginning if 'start' is -1.
long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction)
{
- return -1;
+ return wxNOT_FOUND;
}
// Determines which item (if any) is at the specified point,
// dx is interpreted as number of columns)
bool wxListCtrl::ScrollList(int dx, int dy)
{
- return FALSE;
+ return false;
}
// Sort items.
bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
{
- return FALSE;
+ return false;
}
// message processing
// ----------------------------------------------------------------------------
-bool wxListCtrl::MSWCommand(WXUINT cmd, WXWORD id)
-{
- return false;
-}
-
-bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
-{
- return false;
-}
-
// see comment at the end of wxListCtrl::GetColumn()
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
{
}
-// ----------------------------------------------------------------------------
-// wxWin <-> MSW items conversions
-// ----------------------------------------------------------------------------
-
-static void wxConvertFromMSWListItem(HWND hwndListCtrl,
- wxListItem& info,
- LV_ITEM& lvItem)
-{
-}
-
-static void wxConvertToMSWFlags(long state, long stateMask, LV_ITEM& lvItem)
-{
-}
-
-static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
- const wxListItem& info,
- LV_ITEM& lvItem)
-{
-}
-
-static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
- LV_COLUMN& lvCol)
-{
-}
-
#endif // wxUSE_LISTCTRL
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-#if defined(__WIN95__)
-
-#include "wx/msw/private.h"
-
// ============================================================================
// implementation
// ============================================================================
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxBEGIN_HANDLERS_TABLE(wxSpinButton)
wxEND_HANDLERS_TABLE()
-wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
+wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
#endif
{
}
-bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
- WXWORD pos, WXHWND control)
-{
- return false;
-}
-
-bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *result)
-{
- return false;
-}
-
-bool wxSpinButton::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD WXUNUSED(id))
-{
- return false;
-}
-
-#endif // __WIN95__
-
#endif
// wxUSE_SPINCTN
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/dynarray.h"
#include "wx/imaglist.h"
#include "wx/settings.h"
-#include "wx/msw/treectrl.h"
-#include "wx/msw/dragimag.h"
#include "wx/palmos/wrapcctl.h"
}
}
-// ----------------------------------------------------------------------------
-// implementation
-// ----------------------------------------------------------------------------
-
-bool wxTreeCtrl::MSWCommand(WXUINT cmd, WXWORD id)
-{
- return false;
-}
-
-WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
-{
- return 0;
-}
-
-// process WM_NOTIFY Windows message
-bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
-{
- return false;
-}
-
// ----------------------------------------------------------------------------
// State control.
// ----------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
// Name: palmos/utilsexec.cpp
-// Purpose: wxExecute implementation for MSW
+// Purpose: wxExecute implementation for PalmOS
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Author: William Osborne
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////