40 friend std::ostream & operator<<( std::ostream & STREAM,
const NCtext & OBJ );
44 typedef std::list<NCstring>::iterator iterator;
45 typedef std::list<NCstring>::const_iterator const_iterator;
53 std::list<NCstring> mtext;
55 virtual void lset(
const NCstring & ntext );
56 void lbrset(
const NCstring & ntext,
size_t columns );
65 unsigned Lines()
const;
66 size_t Columns()
const;
68 void append(
const NCstring & line );
70 const std::list<NCstring> & Text()
const {
return mtext; }
72 const NCstring & operator[]( std::wstring::size_type idx )
const;
74 const_iterator begin()
const {
return mtext.begin(); }
76 const_iterator end()
const {
return mtext.end(); }
84 friend std::ostream & operator<<( std::ostream & STREAM,
const NClabel & OBJ );
88 std::wstring::size_type hotline;
90 virtual void lset(
const NCstring & ntext )
92 NCtext::lset( ntext );
105 size_t width()
const {
return Columns(); }
107 unsigned height()
const {
return Lines(); }
109 wsze size()
const {
return wsze( Lines(), Columns() ); }
111 const std::list<NCstring> & getText()
const {
return Text(); }
113 void drawAt(
NCursesWindow & w, chtype style, chtype hotstyle,
115 const NC::ADJUST adjust = NC::TOPLEFT,
116 bool fillup =
true )
const;
119 void drawAt(
NCursesWindow & w, chtype style, chtype hotstyle,
120 const NC::ADJUST adjust = NC::TOPLEFT,
121 bool fillup =
true )
const
123 drawAt( w, style, hotstyle,
wrect( 0, -1 ), adjust, fillup );
126 void drawAt(
NCursesWindow & w, chtype style, chtype hotstyle,
128 const NC::ADJUST adjust = NC::TOPLEFT,
129 bool fillup =
true )
const
131 drawAt( w, style, hotstyle,
wrect( pos, -1 ), adjust, fillup );
134 void drawAt(
NCursesWindow & w, chtype style, chtype hotstyle,
136 const NC::ADJUST adjust = NC::TOPLEFT,
137 bool fillup =
true )
const
139 drawAt( w, style, hotstyle,
wrect( pos, sze ), adjust, fillup );
144 const NC::ADJUST adjust = NC::TOPLEFT,
145 bool fillup =
true )
const
147 drawAt( w, istyle.label, istyle.hint,
wrect( 0, -1 ), adjust, fillup );
152 const NC::ADJUST adjust = NC::TOPLEFT,
153 bool fillup =
true )
const
155 drawAt( w, istyle.label, istyle.hint,
wrect( pos, -1 ), adjust, fillup );
160 const NC::ADJUST adjust = NC::TOPLEFT,
161 bool fillup =
true )
const
163 drawAt( w, istyle.label, istyle.hint,
wrect( pos, sze ), adjust, fillup );
168 const NC::ADJUST adjust = NC::TOPLEFT,
169 bool fillup =
true )
const
171 drawAt( w, istyle.label, istyle.hint, dim, adjust, fillup );
177 bool hasHotkey()
const {
return hotline != std::wstring::npos; }
179 wchar_t hotkey()
const {
return hasHotkey() ? operator[]( hotline ).hotkey() : L
'\0'; }
181 std::wstring::size_type hotpos()
const {
return hasHotkey() ? operator[]( hotline ).hotpos() : std::wstring::npos; }