Files
wxWidgets/interface/wx/itemattr.h
Vadim Zeitlin 246ae58c19 Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a
single wxItemAttr.

Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
2016-04-16 19:04:52 +02:00

83 lines
1.9 KiB
Objective-C

/////////////////////////////////////////////////////////////////////////////
// Name: wx/itemattr.h
// Purpose: wxItemAttr documentation
// Author: Vadim Zeitlin
// Copyright: (c) 2016 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxItemAttr
Represents the attributes (color, font, ...) of an item of a control with
multiple items such as e.g. wxListCtrl.
@library{wxcore}
@category{data}
@see @ref overview_listctrl
@since 3.1.1 (previous versions had the identical wxListItemAttr class)
*/
class wxItemAttr
{
public:
/**
Default Constructor.
*/
wxItemAttr();
/**
Construct a wxItemAttr with the specified foreground and
background colors and font.
*/
wxItemAttr(const wxColour& colText,
const wxColour& colBack,
const wxFont& font);
/**
Returns the currently set background color.
*/
const wxColour& GetBackgroundColour() const;
/**
Returns the currently set font.
*/
const wxFont& GetFont() const;
/**
Returns the currently set text color.
*/
const wxColour& GetTextColour() const;
/**
Returns @true if the currently set background color is valid.
*/
bool HasBackgroundColour() const;
/**
Returns @true if the currently set font is valid.
*/
bool HasFont() const;
/**
Returns @true if the currently set text color is valid.
*/
bool HasTextColour() const;
/**
Sets a new background color.
*/
void SetBackgroundColour(const wxColour& colour);
/**
Sets a new font.
*/
void SetFont(const wxFont& font);
/**
Sets a new text color.
*/
void SetTextColour(const wxColour& colour);
};