]>
git.saurik.com Git - wxWidgets.git/blob - src/common/headercolcmn.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/headercolcmn.cpp
3 // Purpose: wxHeaderColumnBase implementation
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // for compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
29 #include "wx/headercol.h"
31 // ============================================================================
32 // wxHeaderColumnBase implementation
33 // ============================================================================
35 void wxHeaderColumnBase::SetIndividualFlags(int flags
)
37 SetResizeable((flags
& wxCOL_RESIZABLE
) != 0);
38 SetSortable((flags
& wxCOL_SORTABLE
) != 0);
39 SetReorderable((flags
& wxCOL_REORDERABLE
) != 0);
40 SetHidden((flags
& wxCOL_HIDDEN
) != 0);
43 int wxHeaderColumnBase::GetFromIndividualFlags() const
48 flags
|= wxCOL_RESIZABLE
;
50 flags
|= wxCOL_SORTABLE
;
51 if ( IsReorderable() )
52 flags
|= wxCOL_REORDERABLE
;
54 flags
|= wxCOL_HIDDEN
;
59 void wxHeaderColumnBase::ChangeFlag(int flag
, bool set
)
61 if ( HasFlag(flag
) != set
)
65 void wxHeaderColumnBase::SetFlag(int flag
)
67 int flags
= GetFlags();
68 if ( !(flags
& flag
) )
69 SetFlags(flags
| flag
);
72 void wxHeaderColumnBase::ClearFlag(int flag
)
74 int flags
= GetFlags();
76 SetFlags(flags
& ~flag
);
79 void wxHeaderColumnBase::ToggleFlag(int flag
)
81 int flags
= GetFlags();