use TWIST buttons by default on the Mac, but also make it possible to
skip the style adjustments so the programmer can do what they want too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
%rename(TL_SEARCH_FULL) wxTL_SEARCH_FULL;
|
%rename(TL_SEARCH_FULL) wxTL_SEARCH_FULL;
|
||||||
%rename(TL_SEARCH_PARTIAL) wxTL_SEARCH_PARTIAL;
|
%rename(TL_SEARCH_PARTIAL) wxTL_SEARCH_PARTIAL;
|
||||||
%rename(TL_SEARCH_NOCASE) wxTL_SEARCH_NOCASE;
|
%rename(TL_SEARCH_NOCASE) wxTL_SEARCH_NOCASE;
|
||||||
|
%rename(TR_DONT_ADJUST_MAC) wxTR_DONT_ADJUST_MAC;
|
||||||
%rename(TreeListColumnInfo) wxTreeListColumnInfo;
|
%rename(TreeListColumnInfo) wxTreeListColumnInfo;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
%import windows.i
|
%import windows.i
|
||||||
%import controls.i
|
%import controls.i
|
||||||
%pythoncode { wx = _core }
|
%pythoncode { import wx }
|
||||||
%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
|
%pythoncode { __docfilter__ = wx._core.__DocFilter(globals()) }
|
||||||
|
|
||||||
|
|
||||||
MAKE_CONST_WXSTRING2(DynamicSashNameStr, wxT("dynamicSashWindow"));
|
MAKE_CONST_WXSTRING2(DynamicSashNameStr, wxT("dynamicSashWindow"));
|
||||||
@@ -443,6 +443,11 @@ enum {
|
|||||||
wxTL_SEARCH_NOCASE
|
wxTL_SEARCH_NOCASE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
// extra tree styles
|
||||||
|
wxTR_DONT_ADJUST_MAC
|
||||||
|
};
|
||||||
|
%pythoncode { wx.TR_DONT_ADJUST_MAC = TR_DONT_ADJUST_MAC }
|
||||||
|
|
||||||
|
|
||||||
class wxTreeListColumnInfo: public wxObject {
|
class wxTreeListColumnInfo: public wxObject {
|
||||||
|
@@ -44,6 +44,9 @@ typedef void *wxTreeItemIdValue;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define wxTR_DONT_ADJUST_MAC 0x0100 // Don't adjust the style for the Mac
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxTreeListColumnAttrs
|
// wxTreeListColumnAttrs
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -1868,17 +1868,20 @@ bool wxTreeListMainWindow::Create(wxTreeListCtrl *parent,
|
|||||||
const wxString& name )
|
const wxString& name )
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
int major,minor;
|
if ( !(style & wxTR_DONT_ADJUST_MAC))
|
||||||
wxGetOsVersion( &major, &minor );
|
{
|
||||||
|
int major,minor;
|
||||||
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS;
|
if (style & wxTR_HAS_BUTTONS) style |= wxTR_TWIST_BUTTONS;
|
||||||
if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS;
|
if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS;
|
||||||
style &= ~wxTR_LINES_AT_ROOT;
|
style &= ~wxTR_LINES_AT_ROOT;
|
||||||
style |= wxTR_NO_LINES;
|
style |= wxTR_NO_LINES;
|
||||||
if (major < 10)
|
if (major < 10)
|
||||||
style |= wxTR_ROW_LINES;
|
style |= wxTR_ROW_LINES;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxScrolledWindow::Create( parent, id, pos, size,
|
wxScrolledWindow::Create( parent, id, pos, size,
|
||||||
style|wxHSCROLL|wxVSCROLL, name );
|
style|wxHSCROLL|wxVSCROLL, name );
|
||||||
|
|
||||||
|
@@ -17,8 +17,15 @@ class TestPanel(wx.Panel):
|
|||||||
#wx.TR_TWIST_BUTTONS
|
#wx.TR_TWIST_BUTTONS
|
||||||
#| wx.TR_ROW_LINES
|
#| wx.TR_ROW_LINES
|
||||||
#| wx.TR_NO_LINES
|
#| wx.TR_NO_LINES
|
||||||
| wx.TR_FULL_ROW_HIGHLIGHT
|
| wx.TR_FULL_ROW_HIGHLIGHT
|
||||||
|
|
||||||
|
# By default the style will be adjusted on
|
||||||
|
# Mac to use twisty buttons and no lines. If
|
||||||
|
# you would rather control this yourself then
|
||||||
|
# add this style.
|
||||||
|
#| wx.TR_DONT_ADJUST_MAC
|
||||||
)
|
)
|
||||||
|
|
||||||
isz = (16,16)
|
isz = (16,16)
|
||||||
il = wx.ImageList(isz[0], isz[1])
|
il = wx.ImageList(isz[0], isz[1])
|
||||||
fldridx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_FOLDER, wx.ART_OTHER, isz))
|
fldridx = il.Add(wx.ArtProvider_GetBitmap(wx.ART_FOLDER, wx.ART_OTHER, isz))
|
||||||
|
@@ -63,6 +63,7 @@ wxTL_SEARCH_LEVEL = wx.gizmos.TL_SEARCH_LEVEL
|
|||||||
wxTL_SEARCH_FULL = wx.gizmos.TL_SEARCH_FULL
|
wxTL_SEARCH_FULL = wx.gizmos.TL_SEARCH_FULL
|
||||||
wxTL_SEARCH_PARTIAL = wx.gizmos.TL_SEARCH_PARTIAL
|
wxTL_SEARCH_PARTIAL = wx.gizmos.TL_SEARCH_PARTIAL
|
||||||
wxTL_SEARCH_NOCASE = wx.gizmos.TL_SEARCH_NOCASE
|
wxTL_SEARCH_NOCASE = wx.gizmos.TL_SEARCH_NOCASE
|
||||||
|
wxTR_DONT_ADJUST_MAC = wx.gizmos.TR_DONT_ADJUST_MAC
|
||||||
wxTreeListColumnInfo = wx.gizmos.TreeListColumnInfo
|
wxTreeListColumnInfo = wx.gizmos.TreeListColumnInfo
|
||||||
wxTreeListColumnInfoPtr = wx.gizmos.TreeListColumnInfoPtr
|
wxTreeListColumnInfoPtr = wx.gizmos.TreeListColumnInfoPtr
|
||||||
wxTreeListCtrl = wx.gizmos.TreeListCtrl
|
wxTreeListCtrl = wx.gizmos.TreeListCtrl
|
||||||
|
Reference in New Issue
Block a user