cwidget  0.5.17
staticitem.h
1 // staticitem.h -*-c++-*-
2 //
3 // Copyright 2000, 2001, 2005 Daniel Burrows
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; see the file COPYING. If not, write to
17 // the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 // Boston, MA 02111-1307, USA.
19 //
20 //
21 
22 #ifndef STATICITEM_H
23 #define STATICITEM_H
24 
25 #include "treeitem.h"
26 
27 namespace cwidget
28 {
29  namespace widgets
30  {
31  class staticitem : public treeitem
32  {
33  std::wstring name,value;
34  public:
35  staticitem(std::wstring _name, std::wstring _value)
36  : treeitem(false),name(_name),value(_value) {}
37  void paint(tree *win, int y, bool hierarchical, const style &st);
38  const wchar_t *tag() {return value.c_str();}
39  const wchar_t *label() {return value.c_str();}
40  };
41  }
42 }
43 
44 #endif
A "style" is a setting to be applied to a display element (widget, text, etc).
Definition: style.h:51
void paint(tree *win, int y, bool hierarchical, const style &st)
Display this item and this item only (does not descend to the children of the item, if any).
Definition: staticitem.cc:29
The namespace containing everything defined by cwidget.
Definition: columnify.cc:26
label widgets display some (possibly formatted) text statically.
Definition: label.h:24
Definition: treeitem.h:101
Definition: tree.h:57
Definition: staticitem.h:31