49 friend std::ostream & operator<<( std::ostream & str,
const NCWidget & obj );
50 friend std::ostream & operator<<( std::ostream & str,
const NCWidget * obj );
59 void invalidate() { magic = 0; }
68 virtual const char * location()
const {
return "NCWidget"; }
70 virtual void PreDisconnect();
71 virtual void PostDisconnect();
72 virtual void PreReparent();
73 virtual void PostReparent();
79 virtual void grabNotify(
NCWidget * ) {}
81 virtual bool wantFocus(
NCWidget & ngrab ) {
return false; }
87 if ( grabedBy && grabedBy != ngrab )
88 grabedBy->grabNotify(
this );
90 const_cast<NCWidget *&
>( grabedBy ) = ngrab;
95 if ( grabedBy && grabedBy != ograb )
96 grabedBy->grabNotify(
this );
98 const_cast<NCWidget *&
>( grabedBy ) = 0;
110 void wMoveChildTo(
NCWidget & child,
const wpos & newpos );
111 void wRelocate(
const wrect & newrect );
112 void wRelocate(
const wpos & newpos,
const wsze & newsze )
114 wRelocate(
wrect( newpos, newsze ) );
117 virtual void wCreate(
const wrect & newrect );
118 virtual void wMoveTo(
const wpos & newpos );
119 virtual void wDelete();
120 virtual void wUpdate(
bool forced_br =
false );
122 wpos ScreenPos()
const;
126 virtual void wRedraw();
127 virtual void wRecoded();
137 bool isValid()
const {
return magic == YWIDGET_MAGIC; }
144 return Top().Value()->wStyle();
146 return NCurses::style()[NCstyle::DefaultStyle];
150 {
return wStyle().getWidget( GetState(), nonactive ); }
153 {
return wStyle().getFrame( GetState() ); }
156 {
return wStyle().getList( GetState() ); }
158 wsze wGetDefsze()
const {
return defsze; }
160 wrect wGetSize()
const {
return inparent; }
163 void Redraw(
bool sub =
false );
166 NC::WState GetState()
const {
return wstate; }
168 void SetState(
const NC::WState newstate,
bool force =
false );
177 virtual bool HasHotkey(
int key );
178 virtual bool HasFunctionHotkey(
int key )
const;
183 void DumpOn( std::ostream & str, std::string prfx )
const;
Screen position pair in the order line, column: (L, C)
Definition position.h:110
A rectangle is defined by its position and size: wpos Pos, wsze Sze.
Definition position.h:194
Screen dimension (screen size) in the order height, width: (H, W)
Definition position.h:154