remove the long deprecated wxTabCtrl class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
57
configure
vendored
57
configure
vendored
@@ -1,5 +1,5 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in Id: configure.in 57498 2008-12-22 14:03:09Z RR .
|
# From configure.in Id: configure.in 57523 2008-12-24 01:28:55Z VZ .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
|
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
|
||||||
#
|
#
|
||||||
@@ -1831,7 +1831,6 @@ Optional Features:
|
|||||||
--enable-statline use wxStaticLine class
|
--enable-statline use wxStaticLine class
|
||||||
--enable-stattext use wxStaticText class
|
--enable-stattext use wxStaticText class
|
||||||
--enable-statusbar use wxStatusBar class
|
--enable-statusbar use wxStatusBar class
|
||||||
--enable-tabdialog use wxTabControl class
|
|
||||||
--enable-taskbaricon use wxTaskBarIcon class
|
--enable-taskbaricon use wxTaskBarIcon class
|
||||||
--enable-textctrl use wxTextCtrl class
|
--enable-textctrl use wxTextCtrl class
|
||||||
--enable-togglebtn use wxToggleButton class
|
--enable-togglebtn use wxToggleButton class
|
||||||
@@ -2962,7 +2961,6 @@ DEFAULT_wxUSE_LIBSDL=no
|
|||||||
DEFAULT_wxUSE_ACCESSIBILITY=no
|
DEFAULT_wxUSE_ACCESSIBILITY=no
|
||||||
DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
|
DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
|
||||||
DEFAULT_wxUSE_IPV6=no
|
DEFAULT_wxUSE_IPV6=no
|
||||||
DEFAULT_wxUSE_TAB_DIALOG=no
|
|
||||||
DEFAULT_wxUSE_GSTREAMER8=no
|
DEFAULT_wxUSE_GSTREAMER8=no
|
||||||
|
|
||||||
DEFAULT_wxUSE_UNICODE_UTF8=auto
|
DEFAULT_wxUSE_UNICODE_UTF8=auto
|
||||||
@@ -9507,7 +9505,6 @@ if test "$wxUSE_CONTROLS" = "yes"; then
|
|||||||
DEFAULT_wxUSE_STATBOX=yes
|
DEFAULT_wxUSE_STATBOX=yes
|
||||||
DEFAULT_wxUSE_STATLINE=yes
|
DEFAULT_wxUSE_STATLINE=yes
|
||||||
DEFAULT_wxUSE_STATUSBAR=yes
|
DEFAULT_wxUSE_STATUSBAR=yes
|
||||||
DEFAULT_wxUSE_TAB_DIALOG=yes
|
|
||||||
DEFAULT_wxUSE_TOGGLEBTN=yes
|
DEFAULT_wxUSE_TOGGLEBTN=yes
|
||||||
DEFAULT_wxUSE_TOOLBAR=yes
|
DEFAULT_wxUSE_TOOLBAR=yes
|
||||||
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
|
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
|
||||||
@@ -9561,7 +9558,6 @@ elif test "$wxUSE_CONTROLS" = "no"; then
|
|||||||
DEFAULT_wxUSE_STATBOX=no
|
DEFAULT_wxUSE_STATBOX=no
|
||||||
DEFAULT_wxUSE_STATLINE=no
|
DEFAULT_wxUSE_STATLINE=no
|
||||||
DEFAULT_wxUSE_STATUSBAR=no
|
DEFAULT_wxUSE_STATUSBAR=no
|
||||||
DEFAULT_wxUSE_TAB_DIALOG=no
|
|
||||||
DEFAULT_wxUSE_TOGGLEBTN=no
|
DEFAULT_wxUSE_TOGGLEBTN=no
|
||||||
DEFAULT_wxUSE_TOOLBAR=no
|
DEFAULT_wxUSE_TOOLBAR=no
|
||||||
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
|
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
|
||||||
@@ -11686,50 +11682,6 @@ fi
|
|||||||
echo "${ECHO_T}$result" >&6; }
|
echo "${ECHO_T}$result" >&6; }
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
|
||||||
defaultval=$wxUSE_ALL_FEATURES
|
|
||||||
if test -z "$defaultval"; then
|
|
||||||
if test x"$enablestring" = xdisable; then
|
|
||||||
defaultval=yes
|
|
||||||
else
|
|
||||||
defaultval=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-tabdialog" >&5
|
|
||||||
echo $ECHO_N "checking for --${enablestring:-enable}-tabdialog... $ECHO_C" >&6; }
|
|
||||||
# Check whether --enable-tabdialog was given.
|
|
||||||
if test "${enable_tabdialog+set}" = set; then
|
|
||||||
enableval=$enable_tabdialog;
|
|
||||||
if test "$enableval" = yes; then
|
|
||||||
wx_cv_use_tabdialog='wxUSE_TAB_DIALOG=yes'
|
|
||||||
else
|
|
||||||
wx_cv_use_tabdialog='wxUSE_TAB_DIALOG=no'
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
wx_cv_use_tabdialog='wxUSE_TAB_DIALOG=${'DEFAULT_wxUSE_TAB_DIALOG":-$defaultval}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
eval "$wx_cv_use_tabdialog"
|
|
||||||
|
|
||||||
if test x"$enablestring" = xdisable; then
|
|
||||||
if test $wxUSE_TAB_DIALOG = yes; then
|
|
||||||
result=no
|
|
||||||
else
|
|
||||||
result=yes
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
result=$wxUSE_TAB_DIALOG
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: result: $result" >&5
|
|
||||||
echo "${ECHO_T}$result" >&6; }
|
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
enablestring=
|
||||||
defaultval=$wxUSE_ALL_FEATURES
|
defaultval=$wxUSE_ALL_FEATURES
|
||||||
if test -z "$defaultval"; then
|
if test -z "$defaultval"; then
|
||||||
@@ -46124,13 +46076,6 @@ _ACEOF
|
|||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_TAB_DIALOG" = "yes"; then
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define wxUSE_TAB_DIALOG 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_TEXTCTRL" = "yes"; then
|
if test "$wxUSE_TEXTCTRL" = "yes"; then
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define wxUSE_TEXTCTRL 1
|
#define wxUSE_TEXTCTRL 1
|
||||||
|
@@ -372,7 +372,6 @@ dnl features disabled by default
|
|||||||
DEFAULT_wxUSE_ACCESSIBILITY=no
|
DEFAULT_wxUSE_ACCESSIBILITY=no
|
||||||
DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
|
DEFAULT_wxUSE_GRAPHICS_CONTEXT=no
|
||||||
DEFAULT_wxUSE_IPV6=no
|
DEFAULT_wxUSE_IPV6=no
|
||||||
DEFAULT_wxUSE_TAB_DIALOG=no
|
|
||||||
DEFAULT_wxUSE_GSTREAMER8=no
|
DEFAULT_wxUSE_GSTREAMER8=no
|
||||||
|
|
||||||
dnl automatic features
|
dnl automatic features
|
||||||
@@ -838,7 +837,6 @@ if test "$wxUSE_CONTROLS" = "yes"; then
|
|||||||
DEFAULT_wxUSE_STATBOX=yes
|
DEFAULT_wxUSE_STATBOX=yes
|
||||||
DEFAULT_wxUSE_STATLINE=yes
|
DEFAULT_wxUSE_STATLINE=yes
|
||||||
DEFAULT_wxUSE_STATUSBAR=yes
|
DEFAULT_wxUSE_STATUSBAR=yes
|
||||||
DEFAULT_wxUSE_TAB_DIALOG=yes
|
|
||||||
DEFAULT_wxUSE_TOGGLEBTN=yes
|
DEFAULT_wxUSE_TOGGLEBTN=yes
|
||||||
DEFAULT_wxUSE_TOOLBAR=yes
|
DEFAULT_wxUSE_TOOLBAR=yes
|
||||||
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
|
DEFAULT_wxUSE_TOOLBAR_NATIVE=yes
|
||||||
@@ -892,7 +890,6 @@ elif test "$wxUSE_CONTROLS" = "no"; then
|
|||||||
DEFAULT_wxUSE_STATBOX=no
|
DEFAULT_wxUSE_STATBOX=no
|
||||||
DEFAULT_wxUSE_STATLINE=no
|
DEFAULT_wxUSE_STATLINE=no
|
||||||
DEFAULT_wxUSE_STATUSBAR=no
|
DEFAULT_wxUSE_STATUSBAR=no
|
||||||
DEFAULT_wxUSE_TAB_DIALOG=no
|
|
||||||
DEFAULT_wxUSE_TOGGLEBTN=no
|
DEFAULT_wxUSE_TOGGLEBTN=no
|
||||||
DEFAULT_wxUSE_TOOLBAR=no
|
DEFAULT_wxUSE_TOOLBAR=no
|
||||||
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
|
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
|
||||||
@@ -952,7 +949,6 @@ WX_ARG_FEATURE(statbox, [ --enable-statbox use wxStaticBox class], w
|
|||||||
WX_ARG_FEATURE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
|
WX_ARG_FEATURE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE)
|
||||||
WX_ARG_FEATURE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
|
WX_ARG_FEATURE(stattext, [ --enable-stattext use wxStaticText class], wxUSE_STATTEXT)
|
||||||
WX_ARG_FEATURE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
|
WX_ARG_FEATURE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR)
|
||||||
WX_ARG_FEATURE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TAB_DIALOG)
|
|
||||||
WX_ARG_FEATURE(taskbaricon, [ --enable-taskbaricon use wxTaskBarIcon class], wxUSE_TASKBARICON)
|
WX_ARG_FEATURE(taskbaricon, [ --enable-taskbaricon use wxTaskBarIcon class], wxUSE_TASKBARICON)
|
||||||
WX_ARG_FEATURE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
|
WX_ARG_FEATURE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
|
||||||
WX_ARG_FEATURE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
|
WX_ARG_FEATURE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
|
||||||
@@ -6785,10 +6781,6 @@ if test "$wxUSE_STATUSBAR" = "yes"; then
|
|||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS statbar"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_TAB_DIALOG" = "yes"; then
|
|
||||||
AC_DEFINE(wxUSE_TAB_DIALOG)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_TEXTCTRL" = "yes"; then
|
if test "$wxUSE_TEXTCTRL" = "yes"; then
|
||||||
AC_DEFINE(wxUSE_TEXTCTRL)
|
AC_DEFINE(wxUSE_TEXTCTRL)
|
||||||
USES_CONTROLS=1
|
USES_CONTROLS=1
|
||||||
|
@@ -936,14 +936,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* !defined(wxUSE_STATUSBAR) */
|
#endif /* !defined(wxUSE_STATUSBAR) */
|
||||||
|
|
||||||
#ifndef wxUSE_TAB_DIALOG
|
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
|
||||||
# error "wxUSE_TAB_DIALOG must be defined."
|
|
||||||
# else
|
|
||||||
# define wxUSE_TAB_DIALOG 0
|
|
||||||
# endif
|
|
||||||
#endif /* !defined(wxUSE_TAB_DIALOG) */
|
|
||||||
|
|
||||||
#ifndef wxUSE_TASKBARICON
|
#ifndef wxUSE_TASKBARICON
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
# error "wxUSE_TASKBARICON must be defined."
|
# error "wxUSE_TASKBARICON must be defined."
|
||||||
|
@@ -11,11 +11,6 @@
|
|||||||
|
|
||||||
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
||||||
|
|
||||||
#if wxUSE_NOTEBOOK && !wxUSE_TAB_DIALOG
|
|
||||||
# undef wxUSE_TAB_DIALOG
|
|
||||||
# define wxUSE_TAB_DIALOG 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(wxUSE_GADGETS)
|
#if !defined(wxUSE_GADGETS)
|
||||||
# define wxUSE_GADGETS 0
|
# define wxUSE_GADGETS 0
|
||||||
#endif
|
#endif
|
||||||
|
@@ -778,14 +778,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -778,14 +778,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -1,158 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: tabctrl.h
|
|
||||||
// Purpose: wxTabCtrl class
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 01/02/97
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_TABCTRL_H_
|
|
||||||
#define _WX_TABCTRL_H_
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Flags returned by HitTest
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define wxTAB_HITTEST_NOWHERE 1
|
|
||||||
#define wxTAB_HITTEST_ONICON 2
|
|
||||||
#define wxTAB_HITTEST_ONLABEL 4
|
|
||||||
#define wxTAB_HITTEST_ONITEM 6
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabCtrl: public wxControl
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
|
|
||||||
public:
|
|
||||||
/*
|
|
||||||
* Public interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxTabCtrl();
|
|
||||||
|
|
||||||
inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"))
|
|
||||||
{
|
|
||||||
Create(parent, id, pos, size, style, name);
|
|
||||||
}
|
|
||||||
virtual ~wxTabCtrl();
|
|
||||||
|
|
||||||
// Accessors
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int GetSelection() const;
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int GetCurFocus() const;
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* GetImageList() const;
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int GetItemCount() const;
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool GetItemRect(int item, wxRect& rect) const;
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int GetRowCount() const;
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString GetItemText(int item) const ;
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int GetItemImage(int item) const;
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* GetItemData(int item) const;
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int SetSelection(int item);
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void SetImageList(wxImageList* imageList);
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool SetItemText(int item, const wxString& text);
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool SetItemImage(int item, int image);
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool SetItemData(int item, void* data);
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void SetItemSize(const wxSize& size);
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void SetPadding(const wxSize& padding);
|
|
||||||
|
|
||||||
// Operations
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"));
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool DeleteAllItems();
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool DeleteItem(int item);
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int HitTest(const wxPoint& pt, long& flags);
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool InsertItem(int item, const wxString& text, int imageId = -1, void* data = NULL);
|
|
||||||
|
|
||||||
// Implementation
|
|
||||||
|
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
|
||||||
|
|
||||||
// Responds to colour changes
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxImageList* m_imageList;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
DECLARE_NO_COPY_CLASS(wxTabCtrl)
|
|
||||||
};
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabEvent : public wxNotifyEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
|
||||||
int nSel = -1, int nOldSel = -1)
|
|
||||||
: wxNotifyEvent(commandType, id)
|
|
||||||
{
|
|
||||||
m_nSel = nSel;
|
|
||||||
m_nOldSel = nOldSel;
|
|
||||||
}
|
|
||||||
|
|
||||||
// accessors
|
|
||||||
// the currently selected page (-1 if none)
|
|
||||||
int GetSelection() const { return m_nSel; }
|
|
||||||
void SetSelection(int nSel) { m_nSel = nSel; }
|
|
||||||
// the page that was selected before the change (-1 if none)
|
|
||||||
int GetOldSelection() const { return m_nOldSel; }
|
|
||||||
void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
int m_nSel, // currently selected page
|
|
||||||
m_nOldSel; // previously selected page
|
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTabEvent)
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
|
||||||
|
|
||||||
#define EVT_TAB_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGED, \
|
|
||||||
id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTabEventFunction, & fn ), NULL),
|
|
||||||
#define EVT_TAB_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGING, \
|
|
||||||
id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTabEventFunction, & fn ), NULL),
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _WX_TABCTRL_H_
|
|
@@ -778,14 +778,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -778,14 +778,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -1,137 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: tabctrl.h
|
|
||||||
// Purpose: wxTabCtrl class
|
|
||||||
// Author: David Webster
|
|
||||||
// Modified by:
|
|
||||||
// Created: ??/??/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) David Webster
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_TABCTRL_H_
|
|
||||||
#define _WX_TABCTRL_H_
|
|
||||||
|
|
||||||
class wxImageList;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Flags returned by HitTest
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define wxTAB_HITTEST_NOWHERE 1
|
|
||||||
#define wxTAB_HITTEST_ONICON 2
|
|
||||||
#define wxTAB_HITTEST_ONLABEL 4
|
|
||||||
#define wxTAB_HITTEST_ONITEM 6
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabCtrl: public wxControl
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
|
|
||||||
public:
|
|
||||||
/*
|
|
||||||
* Public interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxTabCtrl();
|
|
||||||
|
|
||||||
inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"))
|
|
||||||
{
|
|
||||||
Create(parent, id, pos, size, style, name);
|
|
||||||
}
|
|
||||||
virtual ~wxTabCtrl();
|
|
||||||
|
|
||||||
// Accessors
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int GetSelection() const;
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int GetCurFocus() const;
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* GetImageList() const;
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int GetItemCount() const;
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool GetItemRect(int item, wxRect& rect) const;
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int GetRowCount() const;
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString GetItemText(int item) const ;
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int GetItemImage(int item) const;
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* GetItemData(int item) const;
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int SetSelection(int item);
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void SetImageList(wxImageList* imageList);
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool SetItemText(int item, const wxString& text);
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool SetItemImage(int item, int image);
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool SetItemData(int item, void* data);
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void SetItemSize(const wxSize& size);
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void SetPadding(const wxSize& padding);
|
|
||||||
|
|
||||||
// Operations
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"));
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool DeleteAllItems();
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool DeleteItem(int item);
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int HitTest(const wxPoint& pt, long& flags);
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool InsertItem(int item, const wxString& text, int imageId = -1, void* data = NULL);
|
|
||||||
|
|
||||||
virtual bool OS2OnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
|
||||||
|
|
||||||
// Responds to colour changes
|
|
||||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxImageList* m_imageList;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabEvent: public wxCommandEvent
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxTabEvent)
|
|
||||||
|
|
||||||
public:
|
|
||||||
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
|
||||||
|
|
||||||
#define EVT_TAB_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGED, \
|
|
||||||
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
|
|
||||||
#define EVT_TAB_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TAB_SEL_CHANGING, \
|
|
||||||
id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTabEventFunction) & fn, NULL },
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _WX_TABCTRL_H_
|
|
@@ -1,154 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: tabctrl.h
|
|
||||||
// Purpose: wxTabCtrl class
|
|
||||||
// Author: Stefan Csomor
|
|
||||||
// Modified by:
|
|
||||||
// Created: 1998-01-01
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Stefan Csomor
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_TABCTRL_H_
|
|
||||||
#define _WX_TABCTRL_H_
|
|
||||||
|
|
||||||
#include "wx/control.h"
|
|
||||||
|
|
||||||
class wxImageList;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Flags returned by HitTest
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define wxTAB_HITTEST_NOWHERE 1
|
|
||||||
#define wxTAB_HITTEST_ONICON 2
|
|
||||||
#define wxTAB_HITTEST_ONLABEL 4
|
|
||||||
#define wxTAB_HITTEST_ONITEM 6
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabCtrl: public wxControl
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
|
|
||||||
public:
|
|
||||||
/*
|
|
||||||
* Public interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxTabCtrl();
|
|
||||||
|
|
||||||
inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"))
|
|
||||||
{
|
|
||||||
Create(parent, id, pos, size, style, name);
|
|
||||||
}
|
|
||||||
virtual ~wxTabCtrl();
|
|
||||||
|
|
||||||
// Accessors
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int GetSelection() const;
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int GetCurFocus() const;
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* GetImageList() const;
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int GetItemCount() const;
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool GetItemRect(int item, wxRect& rect) const;
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int GetRowCount() const;
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString GetItemText(int item) const ;
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int GetItemImage(int item) const;
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* GetItemData(int item) const;
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int SetSelection(int item);
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void SetImageList(wxImageList* imageList);
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool SetItemText(int item, const wxString& text);
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool SetItemImage(int item, int image);
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool SetItemData(int item, void* data);
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void SetItemSize(const wxSize& size);
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void SetPadding(const wxSize& padding);
|
|
||||||
|
|
||||||
// Operations
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"));
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool DeleteAllItems();
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool DeleteItem(int item);
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int HitTest(const wxPoint& pt, long& flags);
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool InsertItem(int item, const wxString& text, int imageId = -1, void* data = NULL);
|
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxImageList* m_imageList;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabEvent : public wxNotifyEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
|
||||||
int nSel = -1, int nOldSel = -1)
|
|
||||||
: wxNotifyEvent(commandType, id)
|
|
||||||
{
|
|
||||||
m_nSel = nSel;
|
|
||||||
m_nOldSel = nOldSel;
|
|
||||||
}
|
|
||||||
|
|
||||||
// accessors
|
|
||||||
// the currently selected page (-1 if none)
|
|
||||||
int GetSelection() const { return m_nSel; }
|
|
||||||
void SetSelection(int nSel) { m_nSel = nSel; }
|
|
||||||
// the page that was selected before the change (-1 if none)
|
|
||||||
int GetOldSelection() const { return m_nOldSel; }
|
|
||||||
void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
int m_nSel, // currently selected page
|
|
||||||
m_nOldSel; // previously selected page
|
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTabEvent)
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
|
||||||
|
|
||||||
#define EVT_TAB_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGED, \
|
|
||||||
id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTabEventFunction, & fn ), NULL),
|
|
||||||
#define EVT_TAB_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGING, \
|
|
||||||
id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTabEventFunction, & fn ), NULL),
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _WX_TABCTRL_H_
|
|
@@ -141,7 +141,6 @@
|
|||||||
#define wxUSE_WIZARDDLG 0
|
#define wxUSE_WIZARDDLG 0
|
||||||
#define wxUSE_TOOLBAR_NATIVE 0
|
#define wxUSE_TOOLBAR_NATIVE 0
|
||||||
#define wxUSE_FINDREPLDLG 0
|
#define wxUSE_FINDREPLDLG 0
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
#define wxUSE_TASKBARICON 0
|
#define wxUSE_TASKBARICON 0
|
||||||
|
|
||||||
|
|
||||||
|
@@ -779,14 +779,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
#ifdef __WXMAC_CLASSIC__
|
|
||||||
#include "wx/osx/classic/tabctrl.h"
|
|
||||||
#else
|
|
||||||
#include "wx/osx/carbon/tabctrl.h"
|
|
||||||
#endif
|
|
@@ -778,14 +778,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -1,157 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: wx/palmos/tabctrl.h
|
|
||||||
// Purpose: wxTabCtrl class
|
|
||||||
// Author: William Osborne - minimal working wxPalmOS port
|
|
||||||
// Modified by:
|
|
||||||
// Created: 10/13/04
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) William Osborne
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_TABCTRL_H_
|
|
||||||
#define _WX_TABCTRL_H_
|
|
||||||
|
|
||||||
class wxImageList;
|
|
||||||
|
|
||||||
// WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxToolBarNameStr[];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Flags returned by HitTest
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define wxTAB_HITTEST_NOWHERE 1
|
|
||||||
#define wxTAB_HITTEST_ONICON 2
|
|
||||||
#define wxTAB_HITTEST_ONLABEL 4
|
|
||||||
#define wxTAB_HITTEST_ONITEM 6
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabCtrl: public wxControl
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxTabCtrl)
|
|
||||||
public:
|
|
||||||
/*
|
|
||||||
* Public interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
wxTabCtrl();
|
|
||||||
|
|
||||||
inline wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"))
|
|
||||||
{
|
|
||||||
Create(parent, id, pos, size, style, name);
|
|
||||||
}
|
|
||||||
virtual ~wxTabCtrl();
|
|
||||||
|
|
||||||
// Accessors
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int GetSelection() const;
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int GetCurFocus() const;
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* GetImageList() const;
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int GetItemCount() const;
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool GetItemRect(int item, wxRect& rect) const;
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int GetRowCount() const;
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString GetItemText(int item) const ;
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int GetItemImage(int item) const;
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* GetItemData(int item) const;
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int SetSelection(int item);
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void SetImageList(wxImageList* imageList);
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool SetItemText(int item, const wxString& text);
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool SetItemImage(int item, int image);
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool SetItemData(int item, void* data);
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void SetItemSize(const wxSize& size);
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void SetPadding(const wxSize& padding);
|
|
||||||
|
|
||||||
// Operations
|
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0, const wxString& name = wxT("tabCtrl"));
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool DeleteAllItems();
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool DeleteItem(int item);
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int HitTest(const wxPoint& pt, long& flags);
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool InsertItem(int item, const wxString& text, int imageId = -1, void* data = NULL);
|
|
||||||
|
|
||||||
// Implementation
|
|
||||||
|
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
wxImageList* m_imageList;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
DECLARE_NO_COPY_CLASS(wxTabCtrl)
|
|
||||||
};
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxTabEvent : public wxNotifyEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxTabEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
|
||||||
int nSel = -1, int nOldSel = -1)
|
|
||||||
: wxNotifyEvent(commandType, id)
|
|
||||||
{
|
|
||||||
m_nSel = nSel;
|
|
||||||
m_nOldSel = nOldSel;
|
|
||||||
}
|
|
||||||
|
|
||||||
// accessors
|
|
||||||
// the currently selected page (-1 if none)
|
|
||||||
int GetSelection() const { return m_nSel; }
|
|
||||||
void SetSelection(int nSel) { m_nSel = nSel; }
|
|
||||||
// the page that was selected before the change (-1 if none)
|
|
||||||
int GetOldSelection() const { return m_nOldSel; }
|
|
||||||
void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
int m_nSel, // currently selected page
|
|
||||||
m_nOldSel; // previously selected page
|
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTabEvent)
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTabEventFunction)(wxTabEvent&);
|
|
||||||
|
|
||||||
#define EVT_TAB_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGED, \
|
|
||||||
id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTabEventFunction, & fn ), NULL),
|
|
||||||
#define EVT_TAB_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_COMMAND_TAB_SEL_CHANGING, \
|
|
||||||
id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTabEventFunction, & fn ), NULL),
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _WX_TABCTRL_H_
|
|
@@ -372,8 +372,6 @@
|
|||||||
|
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
#define wxUSE_TASKBARICON 1
|
#define wxUSE_TASKBARICON 1
|
||||||
|
|
||||||
#define wxUSE_GRID 1
|
#define wxUSE_GRID 1
|
||||||
|
@@ -774,14 +774,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -1,22 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: wx/tab.h
|
|
||||||
// Purpose: Generic tab class base header
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created:
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_TAB_H_BASE_
|
|
||||||
#define _WX_TAB_H_BASE_
|
|
||||||
|
|
||||||
#include "wx/defs.h"
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
#include "wx/generic/tabg.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// _WX_TAB_H_BASE_
|
|
@@ -1,32 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: wx/tabctrl.h
|
|
||||||
// Purpose: wxTabCtrl base header
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created:
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_TABCTRL_H_BASE_
|
|
||||||
#define _WX_TABCTRL_H_BASE_
|
|
||||||
|
|
||||||
#include "wx/defs.h"
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED;
|
|
||||||
extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING;
|
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
|
||||||
#include "wx/msw/tabctrl.h"
|
|
||||||
#elif defined(__WXMAC__)
|
|
||||||
#include "wx/osx/tabctrl.h"
|
|
||||||
#elif defined(__WXPM__)
|
|
||||||
#include "wx/os2/tabctrl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
#endif // _WX_TABCTRL_H_BASE_
|
|
@@ -777,14 +777,6 @@
|
|||||||
// Recommended setting: 1
|
// Recommended setting: 1
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
// wxTabDialog is a generic version of wxNotebook but it is incompatible with
|
|
||||||
// the new class. It shouldn't be used in new code.
|
|
||||||
//
|
|
||||||
// Default is 0.
|
|
||||||
//
|
|
||||||
// Recommended setting: 0 (use wxNotebook)
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
// wxTaskBarIcon is a small notification icon shown in the system toolbar or
|
||||||
// dock.
|
// dock.
|
||||||
//
|
//
|
||||||
|
@@ -376,8 +376,6 @@
|
|||||||
|
|
||||||
#define wxUSE_TOOLBOOK 0
|
#define wxUSE_TOOLBOOK 0
|
||||||
|
|
||||||
#define wxUSE_TAB_DIALOG 0
|
|
||||||
|
|
||||||
#define wxUSE_TASKBARICON 0
|
#define wxUSE_TASKBARICON 0
|
||||||
|
|
||||||
#define wxUSE_GRID 0
|
#define wxUSE_GRID 0
|
||||||
|
@@ -403,8 +403,6 @@ typedef pid_t GPid;
|
|||||||
|
|
||||||
#define wxUSE_TOOLBOOK 1
|
#define wxUSE_TOOLBOOK 1
|
||||||
|
|
||||||
#define wxUSE_TAB_DIALOG 1
|
|
||||||
|
|
||||||
#define wxUSE_TASKBARICON 1
|
#define wxUSE_TASKBARICON 1
|
||||||
|
|
||||||
#define wxUSE_GRID 1
|
#define wxUSE_GRID 1
|
||||||
|
1292
src/generic/tabg.cpp
1292
src/generic/tabg.cpp
File diff suppressed because it is too large
Load Diff
@@ -1,432 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: src/msw/tabctrl.cpp
|
|
||||||
// Purpose: wxTabCtrl
|
|
||||||
// Author: Julian Smart
|
|
||||||
// Modified by:
|
|
||||||
// Created: 04/01/98
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/app.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/msw/private.h"
|
|
||||||
|
|
||||||
#include "wx/tabctrl.h"
|
|
||||||
#include "wx/msw/imaglist.h"
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxNotifyEvent)
|
|
||||||
|
|
||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
|
|
||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
|
|
||||||
EVT_SYS_COLOUR_CHANGED(wxTabCtrl::OnSysColourChanged)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxTabCtrl::wxTabCtrl()
|
|
||||||
{
|
|
||||||
m_imageList = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
|
||||||
long style, const wxString& name)
|
|
||||||
{
|
|
||||||
m_imageList = NULL;
|
|
||||||
|
|
||||||
m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
|
||||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
|
||||||
m_foregroundColour = *wxBLACK ;
|
|
||||||
|
|
||||||
SetName(name);
|
|
||||||
|
|
||||||
int x = pos.x;
|
|
||||||
int y = pos.y;
|
|
||||||
int width = size.x;
|
|
||||||
int height = size.y;
|
|
||||||
|
|
||||||
m_windowStyle = style;
|
|
||||||
|
|
||||||
SetParent(parent);
|
|
||||||
|
|
||||||
if (width <= 0)
|
|
||||||
width = 100;
|
|
||||||
if (height <= 0)
|
|
||||||
height = 30;
|
|
||||||
if (x < 0)
|
|
||||||
x = 0;
|
|
||||||
if (y < 0)
|
|
||||||
y = 0;
|
|
||||||
|
|
||||||
m_windowId = (id < 0 ? NewControlId() : id);
|
|
||||||
|
|
||||||
long tabStyle = WS_CHILD | WS_VISIBLE;
|
|
||||||
if (m_windowStyle & wxTC_MULTILINE)
|
|
||||||
tabStyle |= TCS_MULTILINE;
|
|
||||||
if (m_windowStyle & wxTC_RIGHTJUSTIFY)
|
|
||||||
tabStyle |= TCS_RIGHTJUSTIFY;
|
|
||||||
if (m_windowStyle & wxTC_FIXEDWIDTH)
|
|
||||||
tabStyle |= TCS_FIXEDWIDTH;
|
|
||||||
if (m_windowStyle & wxTC_OWNERDRAW)
|
|
||||||
tabStyle |= TCS_OWNERDRAWFIXED;
|
|
||||||
if (m_windowStyle & wxBORDER)
|
|
||||||
tabStyle |= WS_BORDER;
|
|
||||||
|
|
||||||
#ifndef __WXWINCE__
|
|
||||||
tabStyle |= TCS_TOOLTIPS;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Create the toolbar control.
|
|
||||||
HWND hWndTabCtrl = CreateWindowEx(0L, // No extended styles.
|
|
||||||
WC_TABCONTROL, // Class name for the tab control
|
|
||||||
wxEmptyString, // No default text.
|
|
||||||
tabStyle, // Styles and defaults.
|
|
||||||
x, y, width, height, // Standard size and position.
|
|
||||||
(HWND) parent->GetHWND(), // Parent window
|
|
||||||
(HMENU)m_windowId.GetValue(), // ID.
|
|
||||||
wxGetInstance(), // Current instance.
|
|
||||||
NULL ); // No class data.
|
|
||||||
|
|
||||||
m_hWnd = (WXHWND) hWndTabCtrl;
|
|
||||||
if (parent) parent->AddChild(this);
|
|
||||||
|
|
||||||
SubclassWin((WXHWND) hWndTabCtrl);
|
|
||||||
|
|
||||||
SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTabCtrl::~wxTabCtrl()
|
|
||||||
{
|
|
||||||
UnsubclassWin();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|
||||||
{
|
|
||||||
wxTabEvent event(wxEVT_NULL, m_windowId);
|
|
||||||
wxEventType eventType wxDUMMY_INITIALIZE(wxEVT_NULL);
|
|
||||||
NMHDR* hdr1 = (NMHDR*) lParam;
|
|
||||||
switch ( hdr1->code )
|
|
||||||
{
|
|
||||||
case TCN_SELCHANGE:
|
|
||||||
eventType = wxEVT_COMMAND_TAB_SEL_CHANGED;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TCN_SELCHANGING:
|
|
||||||
eventType = wxEVT_COMMAND_TAB_SEL_CHANGING;
|
|
||||||
break;
|
|
||||||
|
|
||||||
#ifndef __WXWINCE__
|
|
||||||
case TTN_NEEDTEXT:
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
// if (!tool->m_shortHelpString.empty())
|
|
||||||
// ttText->lpszText = (char *) (const char *)tool->m_shortHelpString;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
default :
|
|
||||||
return wxControl::MSWOnNotify(idCtrl, lParam, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
event.SetEventObject( this );
|
|
||||||
event.SetEventType(eventType);
|
|
||||||
event.SetInt(idCtrl) ;
|
|
||||||
event.SetSelection(idCtrl);
|
|
||||||
|
|
||||||
return HandleWindowEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
|
||||||
void wxTabCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|
||||||
{
|
|
||||||
m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
|
||||||
GetGValue(GetSysColor(COLOR_BTNFACE)),
|
|
||||||
GetBValue(GetSysColor(COLOR_BTNFACE)));
|
|
||||||
|
|
||||||
Refresh();
|
|
||||||
|
|
||||||
// Propagate the event to the non-top-level children
|
|
||||||
wxWindow::OnSysColourChanged(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool wxTabCtrl::DeleteAllItems()
|
|
||||||
{
|
|
||||||
return ( TabCtrl_DeleteAllItems( (HWND) GetHWND() ) != FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool wxTabCtrl::DeleteItem(int item)
|
|
||||||
{
|
|
||||||
return ( TabCtrl_DeleteItem( (HWND) GetHWND(), item) != FALSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int wxTabCtrl::GetSelection() const
|
|
||||||
{
|
|
||||||
return (int) TabCtrl_GetCurSel( (HWND) GetHWND() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int wxTabCtrl::GetCurFocus() const
|
|
||||||
{
|
|
||||||
return (int) TabCtrl_GetCurFocus( (HWND) GetHWND() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* wxTabCtrl::GetImageList() const
|
|
||||||
{
|
|
||||||
return m_imageList;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int wxTabCtrl::GetItemCount() const
|
|
||||||
{
|
|
||||||
return (int) TabCtrl_GetItemCount( (HWND) GetHWND() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
|
|
||||||
{
|
|
||||||
RECT rect;
|
|
||||||
if ( !TabCtrl_GetItemRect( (HWND) GetHWND(), item, & rect) )
|
|
||||||
return false;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxrect.x = rect.left; wxrect.y = rect.top;
|
|
||||||
wxrect.width = rect.right - rect.left;
|
|
||||||
wxrect.height = rect.bottom - rect.top;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int wxTabCtrl::GetRowCount() const
|
|
||||||
{
|
|
||||||
return (int) TabCtrl_GetRowCount( (HWND) GetHWND() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString wxTabCtrl::GetItemText(int item) const
|
|
||||||
{
|
|
||||||
wxChar buf[256];
|
|
||||||
wxString str(wxEmptyString);
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_TEXT;
|
|
||||||
tcItem.pszText = buf;
|
|
||||||
tcItem.cchTextMax = 256;
|
|
||||||
|
|
||||||
if (TabCtrl_GetItem( (HWND) GetHWND(), item, & tcItem) )
|
|
||||||
str = tcItem.pszText;
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int wxTabCtrl::GetItemImage(int item) const
|
|
||||||
{
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_IMAGE;
|
|
||||||
|
|
||||||
if (TabCtrl_GetItem( (HWND) GetHWND(), item, & tcItem) )
|
|
||||||
return tcItem.iImage;
|
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* wxTabCtrl::GetItemData(int item) const
|
|
||||||
{
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_PARAM;
|
|
||||||
|
|
||||||
if (TabCtrl_GetItem( (HWND) GetHWND(), item, & tcItem) )
|
|
||||||
return (void*) tcItem.lParam;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
|
|
||||||
{
|
|
||||||
TC_HITTESTINFO hitTestInfo;
|
|
||||||
hitTestInfo.pt.x = pt.x;
|
|
||||||
hitTestInfo.pt.y = pt.y;
|
|
||||||
int item = TabCtrl_HitTest( (HWND) GetHWND(), & hitTestInfo ) ;
|
|
||||||
flags = 0;
|
|
||||||
|
|
||||||
if ((hitTestInfo.flags & TCHT_NOWHERE) == TCHT_NOWHERE)
|
|
||||||
flags |= wxTAB_HITTEST_NOWHERE;
|
|
||||||
if ((hitTestInfo.flags & TCHT_ONITEMICON) == TCHT_ONITEMICON)
|
|
||||||
flags |= wxTAB_HITTEST_ONICON;
|
|
||||||
if ((hitTestInfo.flags & TCHT_ONITEMLABEL) == TCHT_ONITEMLABEL)
|
|
||||||
flags |= wxTAB_HITTEST_ONLABEL;
|
|
||||||
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
|
|
||||||
{
|
|
||||||
wxChar buf[256];
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_PARAM;
|
|
||||||
tcItem.lParam = (long) data;
|
|
||||||
if (!text.empty())
|
|
||||||
{
|
|
||||||
tcItem.mask |= TCIF_TEXT;
|
|
||||||
wxStrcpy(buf, (const wxChar*) text);
|
|
||||||
tcItem.pszText = buf;
|
|
||||||
tcItem.cchTextMax = 256;
|
|
||||||
}
|
|
||||||
if (imageId != -1)
|
|
||||||
{
|
|
||||||
tcItem.mask |= TCIF_IMAGE;
|
|
||||||
tcItem.iImage = imageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (TabCtrl_InsertItem( (HWND) GetHWND(), item, & tcItem) != -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int wxTabCtrl::SetSelection(int item)
|
|
||||||
{
|
|
||||||
return (int) TabCtrl_SetCurSel( (HWND) GetHWND(), item );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void wxTabCtrl::SetImageList(wxImageList* imageList)
|
|
||||||
{
|
|
||||||
m_imageList = imageList;
|
|
||||||
(void) TabCtrl_SetImageList( (HWND) GetHWND(), (HIMAGELIST) imageList->GetHIMAGELIST() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool wxTabCtrl::SetItemText(int item, const wxString& text)
|
|
||||||
{
|
|
||||||
wxChar buf[256];
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_TEXT;
|
|
||||||
wxStrcpy(buf, (const wxChar*) text);
|
|
||||||
tcItem.pszText = buf;
|
|
||||||
tcItem.cchTextMax = 256;
|
|
||||||
|
|
||||||
return ( TabCtrl_SetItem( (HWND) GetHWND(), item, & tcItem) != 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool wxTabCtrl::SetItemImage(int item, int image)
|
|
||||||
{
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_IMAGE;
|
|
||||||
tcItem.iImage = image;
|
|
||||||
|
|
||||||
return ( TabCtrl_SetItem( (HWND) GetHWND(), item, & tcItem) != 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool wxTabCtrl::SetItemData(int item, void* data)
|
|
||||||
{
|
|
||||||
TC_ITEM tcItem;
|
|
||||||
tcItem.mask = TCIF_PARAM;
|
|
||||||
tcItem.lParam = (long) data;
|
|
||||||
|
|
||||||
return ( TabCtrl_SetItem( (HWND) GetHWND(), item, & tcItem) != 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void wxTabCtrl::SetItemSize(const wxSize& size)
|
|
||||||
{
|
|
||||||
TabCtrl_SetItemSize( (HWND) GetHWND(), size.x, size.y );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void wxTabCtrl::SetPadding(const wxSize& padding)
|
|
||||||
{
|
|
||||||
TabCtrl_SetPadding( (HWND) GetHWND(), padding.x, padding.y );
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// These are the default colors used to map the bitmap colors
|
|
||||||
// to the current system colors
|
|
||||||
|
|
||||||
#define BGR_BUTTONTEXT (RGB(000,000,000)) // black
|
|
||||||
#define BGR_BUTTONSHADOW (RGB(128,128,128)) // dark grey
|
|
||||||
#define BGR_BUTTONFACE (RGB(192,192,192)) // bright grey
|
|
||||||
#define BGR_BUTTONHILIGHT (RGB(255,255,255)) // white
|
|
||||||
#define BGR_BACKGROUNDSEL (RGB(255,000,000)) // blue
|
|
||||||
#define BGR_BACKGROUND (RGB(255,000,255)) // magenta
|
|
||||||
|
|
||||||
void wxMapBitmap(HBITMAP hBitmap, int width, int height)
|
|
||||||
{
|
|
||||||
COLORMAP ColorMap[] = {
|
|
||||||
{BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black
|
|
||||||
{BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey
|
|
||||||
{BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey
|
|
||||||
{BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white
|
|
||||||
{BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue
|
|
||||||
{BGR_BACKGROUND, COLOR_WINDOW} // magenta
|
|
||||||
};
|
|
||||||
|
|
||||||
int NUM_MAPS = (sizeof(ColorMap)/sizeof(COLORMAP));
|
|
||||||
int n;
|
|
||||||
for ( n = 0; n < NUM_MAPS; n++)
|
|
||||||
{
|
|
||||||
ColorMap[n].to = ::GetSysColor(ColorMap[n].to);
|
|
||||||
}
|
|
||||||
|
|
||||||
HBITMAP hbmOld;
|
|
||||||
HDC hdcMem = CreateCompatibleDC(NULL);
|
|
||||||
|
|
||||||
if (hdcMem)
|
|
||||||
{
|
|
||||||
hbmOld = SelectObject(hdcMem, hBitmap);
|
|
||||||
|
|
||||||
int i, j, k;
|
|
||||||
for ( i = 0; i < width; i++)
|
|
||||||
{
|
|
||||||
for ( j = 0; j < height; j++)
|
|
||||||
{
|
|
||||||
COLORREF pixel = ::GetPixel(hdcMem, i, j);
|
|
||||||
/*
|
|
||||||
BYTE red = GetRValue(pixel);
|
|
||||||
BYTE green = GetGValue(pixel);
|
|
||||||
BYTE blue = GetBValue(pixel);
|
|
||||||
*/
|
|
||||||
|
|
||||||
for ( k = 0; k < NUM_MAPS; k ++)
|
|
||||||
{
|
|
||||||
if ( ColorMap[k].from == pixel )
|
|
||||||
{
|
|
||||||
/* COLORREF actualPixel = */ ::SetPixel(hdcMem, i, j, ColorMap[k].to);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SelectObject(hdcMem, hbmOld);
|
|
||||||
DeleteObject(hdcMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // wxUSE_TAB_DIALOG
|
|
@@ -1,360 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: src/os2/tabctrl.cpp
|
|
||||||
// Purpose: wxTabCtrl
|
|
||||||
// Author: David Webster
|
|
||||||
// Modified by:
|
|
||||||
// Created: 10/17/99
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) David Webster
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/app.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "malloc.h"
|
|
||||||
|
|
||||||
#define INCL_PM
|
|
||||||
#include <os2.h>
|
|
||||||
|
|
||||||
//#include "wx/msw/dib.h"
|
|
||||||
#include "wx/os2/tabctrl.h"
|
|
||||||
#include "wx/os2/private.h"
|
|
||||||
#include "wx/imaglist.h"
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxTabCtrl::wxTabCtrl()
|
|
||||||
{
|
|
||||||
m_imageList = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
|
||||||
long style, const wxString& name)
|
|
||||||
{
|
|
||||||
m_imageList = NULL;
|
|
||||||
|
|
||||||
m_backgroundColour = *wxWHITE; // TODO: wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
|
||||||
// GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
|
||||||
m_foregroundColour = *wxBLACK ;
|
|
||||||
|
|
||||||
SetName(name);
|
|
||||||
|
|
||||||
int x = pos.x;
|
|
||||||
int y = pos.y;
|
|
||||||
int width = size.x;
|
|
||||||
int height = size.y;
|
|
||||||
|
|
||||||
m_windowStyle = style;
|
|
||||||
|
|
||||||
SetFont(* (wxTheFontList->FindOrCreateFont(11, wxSWISS, wxNORMAL, wxNORMAL)));
|
|
||||||
|
|
||||||
SetParent(parent);
|
|
||||||
|
|
||||||
if (width <= 0)
|
|
||||||
width = 100;
|
|
||||||
if (height <= 0)
|
|
||||||
height = 30;
|
|
||||||
if (x < 0)
|
|
||||||
x = 0;
|
|
||||||
if (y < 0)
|
|
||||||
y = 0;
|
|
||||||
|
|
||||||
m_windowId = (id < 0 ? NewControlId() : id);
|
|
||||||
|
|
||||||
// Create the toolbar control.
|
|
||||||
HWND hWndTabCtrl = 0;
|
|
||||||
// TODO: create tab control
|
|
||||||
|
|
||||||
m_hWnd = (WXHWND) hWndTabCtrl;
|
|
||||||
if (parent) parent->AddChild(this);
|
|
||||||
|
|
||||||
SubclassWin((WXHWND) hWndTabCtrl);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTabCtrl::~wxTabCtrl()
|
|
||||||
{
|
|
||||||
UnsubclassWin();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::OS2OnNotify(int idCtrl,
|
|
||||||
WXLPARAM WXUNUSED(lParam),
|
|
||||||
WXLPARAM *WXUNUSED(result) )
|
|
||||||
{
|
|
||||||
wxTabEvent event(wxEVT_NULL, m_windowId);
|
|
||||||
wxEventType eventType = wxEVT_NULL;
|
|
||||||
// TODO:
|
|
||||||
/*
|
|
||||||
NMHDR* hdr1 = (NMHDR*) lParam;
|
|
||||||
switch ( hdr1->code )
|
|
||||||
{
|
|
||||||
case TCN_SELCHANGE:
|
|
||||||
eventType = wxEVT_COMMAND_TAB_SEL_CHANGED;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TCN_SELCHANGING:
|
|
||||||
eventType = wxEVT_COMMAND_TAB_SEL_CHANGING;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TTN_NEEDTEXT:
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
// if (tool->m_shortHelpString != "")
|
|
||||||
// ttText->lpszText = (char *) (const char *)tool->m_shortHelpString;
|
|
||||||
}
|
|
||||||
|
|
||||||
default :
|
|
||||||
return wxControl::OS2OnNotify(idCtrl, lParam, result);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
event.SetEventObject( this );
|
|
||||||
event.SetEventType(eventType);
|
|
||||||
event.SetInt(idCtrl) ;
|
|
||||||
|
|
||||||
return ProcessEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
|
||||||
void wxTabCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
/*
|
|
||||||
m_backgroundColour = wxColour(GetRValue(GetSysColor(COLOR_BTNFACE)),
|
|
||||||
GetGValue(GetSysColor(COLOR_BTNFACE)),
|
|
||||||
GetBValue(GetSysColor(COLOR_BTNFACE)));
|
|
||||||
|
|
||||||
Refresh();
|
|
||||||
*/
|
|
||||||
// Propagate the event to the non-top-level children
|
|
||||||
wxWindow::OnSysColourChanged(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool wxTabCtrl::DeleteAllItems()
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool wxTabCtrl::DeleteItem(int WXUNUSED(item))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int wxTabCtrl::GetSelection() const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int wxTabCtrl::GetCurFocus() const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* wxTabCtrl::GetImageList() const
|
|
||||||
{
|
|
||||||
return m_imageList;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int wxTabCtrl::GetItemCount() const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool wxTabCtrl::GetItemRect(int WXUNUSED(item),
|
|
||||||
wxRect& WXUNUSED(wxrect)) const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int wxTabCtrl::GetRowCount() const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString wxTabCtrl::GetItemText(int WXUNUSED(item)) const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return wxEmptyString;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int wxTabCtrl::GetItemImage(int WXUNUSED(item)) const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* wxTabCtrl::GetItemData(int WXUNUSED(item)) const
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int wxTabCtrl::HitTest(const wxPoint& WXUNUSED(pt), long& WXUNUSED(flags))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool wxTabCtrl::InsertItem(int WXUNUSED(item),
|
|
||||||
const wxString& WXUNUSED(text),
|
|
||||||
int WXUNUSED(imageId),
|
|
||||||
void* WXUNUSED(data))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int wxTabCtrl::SetSelection(int WXUNUSED(item))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void wxTabCtrl::SetImageList(wxImageList* WXUNUSED(imageList))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool wxTabCtrl::SetItemText(int WXUNUSED(item), const wxString& WXUNUSED(text))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool wxTabCtrl::SetItemImage(int WXUNUSED(item), int WXUNUSED(image))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool wxTabCtrl::SetItemData(int WXUNUSED(item), void* WXUNUSED(data))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void wxTabCtrl::SetItemSize(const wxSize& WXUNUSED(size))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void wxTabCtrl::SetPadding(const wxSize& WXUNUSED(padding))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// These are the default colors used to map the bitmap colors
|
|
||||||
// to the current system colors
|
|
||||||
|
|
||||||
#define BGR_BUTTONTEXT (RGB(000,000,000)) // black
|
|
||||||
#define BGR_BUTTONSHADOW (RGB(128,128,128)) // dark grey
|
|
||||||
#define BGR_BUTTONFACE (RGB(192,192,192)) // bright grey
|
|
||||||
#define BGR_BUTTONHILIGHT (RGB(255,255,255)) // white
|
|
||||||
#define BGR_BACKGROUNDSEL (RGB(255,000,000)) // blue
|
|
||||||
#define BGR_BACKGROUND (RGB(255,000,255)) // magenta
|
|
||||||
|
|
||||||
void wxMapBitmap(HBITMAP hBitmap, int width, int height)
|
|
||||||
{
|
|
||||||
COLORMAP ColorMap[] = {
|
|
||||||
{BGR_BUTTONTEXT, COLOR_BTNTEXT}, // black
|
|
||||||
{BGR_BUTTONSHADOW, COLOR_BTNSHADOW}, // dark grey
|
|
||||||
{BGR_BUTTONFACE, COLOR_BTNFACE}, // bright grey
|
|
||||||
{BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white
|
|
||||||
{BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT}, // blue
|
|
||||||
{BGR_BACKGROUND, COLOR_WINDOW} // magenta
|
|
||||||
};
|
|
||||||
|
|
||||||
int NUM_MAPS = (sizeof(ColorMap)/sizeof(COLORMAP));
|
|
||||||
int n;
|
|
||||||
for ( n = 0; n < NUM_MAPS; n++)
|
|
||||||
{
|
|
||||||
ColorMap[n].to = ::GetSysColor(ColorMap[n].to);
|
|
||||||
}
|
|
||||||
|
|
||||||
HBITMAP hbmOld;
|
|
||||||
HDC hdcMem = CreateCompatibleDC(NULL);
|
|
||||||
|
|
||||||
if (hdcMem)
|
|
||||||
{
|
|
||||||
hbmOld = SelectObject(hdcMem, hBitmap);
|
|
||||||
|
|
||||||
int i, j, k;
|
|
||||||
for ( i = 0; i < width; i++)
|
|
||||||
{
|
|
||||||
for ( j = 0; j < height; j++)
|
|
||||||
{
|
|
||||||
COLORREF pixel = ::GetPixel(hdcMem, i, j);
|
|
||||||
/*
|
|
||||||
BYTE red = GetRValue(pixel);
|
|
||||||
BYTE green = GetGValue(pixel);
|
|
||||||
BYTE blue = GetBValue(pixel);
|
|
||||||
*/
|
|
||||||
|
|
||||||
for ( k = 0; k < NUM_MAPS; k ++)
|
|
||||||
{
|
|
||||||
if ( ColorMap[k].from == pixel )
|
|
||||||
{
|
|
||||||
/* COLORREF actualPixel = */ ::SetPixel(hdcMem, i, j, ColorMap[k].to);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SelectObject(hdcMem, hbmOld);
|
|
||||||
DeleteObject(hdcMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Tab event
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent)
|
|
||||||
|
|
||||||
wxTabEvent::wxTabEvent(wxEventType commandType, int id)
|
|
||||||
:wxCommandEvent(commandType, id)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxUSE_TAB_DIALOG
|
|
@@ -1,18 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: src/osx/carbon/tabctrl.cpp
|
|
||||||
// Purpose: wxTabCtrl
|
|
||||||
// Author: Stefan Csomor
|
|
||||||
// Modified by:
|
|
||||||
// Created: 1998-01-01
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) Stefan Csomor
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
// superseeded by wxNotebook implementation, skeleton moved to src/osx/
|
|
||||||
|
|
||||||
#endif // wxUSE_TAB_DIALOG
|
|
@@ -1,190 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: src/osx/tabctrl_osx.cpp
|
|
||||||
// Purpose: wxTabCtrl
|
|
||||||
// Author: Stefan Csomor
|
|
||||||
// Modified by:
|
|
||||||
// Created: 1998-01-01
|
|
||||||
// RCS-ID: $Id: tabctrl.cpp 54129 2008-06-11 19:30:52Z SC $
|
|
||||||
// Copyright: (c) Stefan Csomor
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
#include "wx/tabctrl.h"
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/control.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/osx/private.h"
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxNotifyEvent)
|
|
||||||
|
|
||||||
// this control has been superseeded by the native wxNotebook implementation, but
|
|
||||||
// we leave the skeleton here, just in case it might become useful ...
|
|
||||||
|
|
||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
|
|
||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
|
||||||
wxTabCtrl::wxTabCtrl()
|
|
||||||
{
|
|
||||||
m_macIsUserPane = false;
|
|
||||||
m_imageList = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::Create( wxWindow *parent,
|
|
||||||
wxWindowID id, const wxPoint& pos, const wxSize& size,
|
|
||||||
long style, const wxString& name )
|
|
||||||
{
|
|
||||||
m_macIsUserPane = false;
|
|
||||||
m_imageList = NULL;
|
|
||||||
|
|
||||||
if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
m_peer = wxWidgetImpl::CreateTabView( this, parent, id, pos, size, style, GetExtraStyle );
|
|
||||||
|
|
||||||
MacPostControlCreate( pos, size );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTabCtrl::~wxTabCtrl()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxTabCtrl::Command(wxCommandEvent& event)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::DeleteAllItems()
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::DeleteItem(int item)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxTabCtrl::GetSelection() const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
//
|
|
||||||
int wxTabCtrl::GetCurFocus() const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxImageList * wxTabCtrl::GetImageList() const
|
|
||||||
{
|
|
||||||
return m_imageList;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxTabCtrl::GetItemCount() const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxTabCtrl::GetRowCount() const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString wxTabCtrl::GetItemText(int item) const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return wxEmptyString;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxTabCtrl::GetItemImage(int item) const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void* wxTabCtrl::GetItemData(int item) const
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxTabCtrl::SetSelection(int item)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxTabCtrl::SetImageList(wxImageList* imageList)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::SetItemText(int item, const wxString& text)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::SetItemImage(int item, int image)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::SetItemData(int item, void* data)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void wxTabCtrl::SetItemSize(const wxSize& size)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void wxTabCtrl::SetPadding(const wxSize& padding)
|
|
||||||
{
|
|
||||||
// TODO:
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxUSE_TAB_DIALOG
|
|
@@ -1,182 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: src/palmos/tabctrl.cpp
|
|
||||||
// Purpose: wxTabCtrl
|
|
||||||
// Author: William Osborne - minimal working wxPalmOS port
|
|
||||||
// Modified by:
|
|
||||||
// Created: 10/13/04
|
|
||||||
// RCS-ID: $Id$
|
|
||||||
// Copyright: (c) William Osborne
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_TAB_DIALOG
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#include "wx/app.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__WIN95__)
|
|
||||||
|
|
||||||
#include "wx/tabctrl.h"
|
|
||||||
#include "wx/palmos/imaglist.h"
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabCtrl, wxControl)
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxNotifyEvent)
|
|
||||||
|
|
||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGED)
|
|
||||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_TAB_SEL_CHANGING)
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxTabCtrl, wxControl)
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
wxTabCtrl::wxTabCtrl()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
|
||||||
long style, const wxString& name)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTabCtrl::~wxTabCtrl()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxTabCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete all items
|
|
||||||
bool wxTabCtrl::DeleteAllItems()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete an item
|
|
||||||
bool wxTabCtrl::DeleteItem(int item)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the selection
|
|
||||||
int wxTabCtrl::GetSelection() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the tab with the current keyboard focus
|
|
||||||
int wxTabCtrl::GetCurFocus() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the associated image list
|
|
||||||
wxImageList* wxTabCtrl::GetImageList() const
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the number of items
|
|
||||||
int wxTabCtrl::GetItemCount() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the rect corresponding to the tab
|
|
||||||
bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the number of rows
|
|
||||||
int wxTabCtrl::GetRowCount() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item text
|
|
||||||
wxString wxTabCtrl::GetItemText(int item) const
|
|
||||||
{
|
|
||||||
wxString str(wxEmptyString);
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item image
|
|
||||||
int wxTabCtrl::GetItemImage(int item) const
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the item data
|
|
||||||
void* wxTabCtrl::GetItemData(int item) const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hit test
|
|
||||||
int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insert an item
|
|
||||||
bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the selection
|
|
||||||
int wxTabCtrl::SetSelection(int item)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the image list
|
|
||||||
void wxTabCtrl::SetImageList(wxImageList* imageList)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the text for an item
|
|
||||||
bool wxTabCtrl::SetItemText(int item, const wxString& text)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the image for an item
|
|
||||||
bool wxTabCtrl::SetItemImage(int item, int image)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the data for an item
|
|
||||||
bool wxTabCtrl::SetItemData(int item, void* data)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the size for a fixed-width tab control
|
|
||||||
void wxTabCtrl::SetItemSize(const wxSize& size)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the padding between tabs
|
|
||||||
void wxTabCtrl::SetPadding(const wxSize& padding)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
// __WIN95__
|
|
||||||
|
|
||||||
#endif // wxUSE_TAB_DIALOG
|
|
Reference in New Issue
Block a user