Add support for wxDC_ROW_LINES for GTK+ and OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -37,6 +37,9 @@ from \helpref{wxVariant::GetType}{wxvariantgettype}.
|
|||||||
\begin{twocollist}\itemsep=0pt
|
\begin{twocollist}\itemsep=0pt
|
||||||
\twocolitem{\windowstyle{wxDV\_SINGLE}}{Single selection mode. This is the default.}
|
\twocolitem{\windowstyle{wxDV\_SINGLE}}{Single selection mode. This is the default.}
|
||||||
\twocolitem{\windowstyle{wxDV\_MULTIPLE}}{Multiple selection mode.}
|
\twocolitem{\windowstyle{wxDV\_MULTIPLE}}{Multiple selection mode.}
|
||||||
|
\twocolitem{\windowstyle{wxDV\_ROW\_LINES}}{Use alternating colours for rows if supported by platform and theme.}
|
||||||
|
\twocolitem{\windowstyle{wxDV\_HORIZ\_RULES}}{Display fine rules between row if supported.}
|
||||||
|
\twocolitem{\windowstyle{wxDV\_VERT\_RULES}}{Display fine rules between columns is supported.}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -499,6 +499,8 @@ protected:
|
|||||||
#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
|
#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
|
||||||
#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
|
#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
|
||||||
|
|
||||||
|
#define wxDV_ROW_LINES 0x0010 // alternating colour in rows
|
||||||
|
|
||||||
class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
|
class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -939,13 +941,13 @@ public:
|
|||||||
wxDataViewTreeCtrl();
|
wxDataViewTreeCtrl();
|
||||||
wxDataViewTreeCtrl( wxWindow *parent, wxWindowID id,
|
wxDataViewTreeCtrl( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER,
|
const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
|
||||||
const wxValidator& validator = wxDefaultValidator );
|
const wxValidator& validator = wxDefaultValidator );
|
||||||
~wxDataViewTreeCtrl();
|
~wxDataViewTreeCtrl();
|
||||||
|
|
||||||
bool Create( wxWindow *parent, wxWindowID id,
|
bool Create( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER,
|
const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
|
||||||
const wxValidator& validator = wxDefaultValidator );
|
const wxValidator& validator = wxDefaultValidator );
|
||||||
|
|
||||||
wxDataViewTreeStore *GetStore()
|
wxDataViewTreeStore *GetStore()
|
||||||
@@ -1004,6 +1006,7 @@ public:
|
|||||||
|
|
||||||
void OnExpanded( wxDataViewEvent &event );
|
void OnExpanded( wxDataViewEvent &event );
|
||||||
void OnCollapsed( wxDataViewEvent &event );
|
void OnCollapsed( wxDataViewEvent &event );
|
||||||
|
void OnSize( wxSizeEvent &event );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxImageList *m_imageList;
|
wxImageList *m_imageList;
|
||||||
|
@@ -1693,6 +1693,11 @@ void wxDataViewTreeCtrl::OnCollapsed( wxDataViewEvent &event )
|
|||||||
GetStore()->ItemChanged( event.GetItem() );
|
GetStore()->ItemChanged( event.GetItem() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxDataViewTreeCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||||
|
{
|
||||||
|
#if !defined(__WXGTK20__)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_DATAVIEWCTRL
|
#endif // wxUSE_DATAVIEWCTRL
|
||||||
|
|
||||||
|
@@ -3344,13 +3344,12 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
else if (style & wxDV_HORIZ_RULES)
|
else if (style & wxDV_HORIZ_RULES)
|
||||||
grid = GTK_TREE_VIEW_GRID_LINES_HORIZONTAL;
|
grid = GTK_TREE_VIEW_GRID_LINES_HORIZONTAL;
|
||||||
|
|
||||||
gtk_tree_view_set_grid_lines( GTK_TREE_VIEW(m_treeview), grid );
|
if (grid != GTK_TREE_VIEW_GRID_LINES_NONE)
|
||||||
|
gtk_tree_view_set_grid_lines( GTK_TREE_VIEW(m_treeview), grid );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
{
|
|
||||||
gtk_tree_view_set_rules_hint( GTK_TREE_VIEW(m_treeview), (style & wxDV_HORIZ_RULES) != 0 );
|
gtk_tree_view_set_rules_hint( GTK_TREE_VIEW(m_treeview), (style & wxDV_ROW_LINES) != 0 );
|
||||||
}
|
|
||||||
|
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_widget),
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_widget),
|
||||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||||
|
Reference in New Issue
Block a user