30 #include <yui/YDialog.h>
32 #include "NCPushButton.h"
43 friend std::ostream & operator<<( std::ostream & str,
const NCDialog & obj );
44 friend std::ostream & operator<<( std::ostream & str,
const NCDialog * obj );
52 void Activate( SeekDir Direction );
59 virtual const char * location()
const {
return "NCDialog"; }
66 NCstyle::StyleSet mystyleset;
69 unsigned inMultiDraw_i;
75 YEvent::EventReason eventReason;
81 void grabActive(
NCWidget * nactive );
82 virtual void grabNotify(
NCWidget * mgrab );
83 virtual bool wantFocus(
NCWidget & ngrab );
85 virtual void wCreate(
const wrect & newrect );
86 virtual void wMoveTo(
const wpos & newpos );
87 virtual void wDelete();
88 virtual void wRedraw();
89 virtual void wRecoded();
90 virtual void wUpdate(
bool forced_br =
false );
91 void doUpdate() { wUpdate(
true ); }
102 bool ActivateByKey(
int key );
104 void processInput(
int timeout_millisec );
106 std::map<int, NCstring> describeFunctionKeys();
108 bool flushTypeahead();
112 virtual wint_t getch(
int timeout_millisec = -1 );
117 virtual void startMultipleChanges();
118 virtual void doneMultipleChanges();
152 YDialogColorMode colorMode = YDialogNormalColor );
159 bool isActive()
const {
return active; }
166 virtual int preferredWidth();
167 virtual int preferredHeight();
169 virtual void setSize(
int newWidth,
int newHeight );
171 void setStatusLine();
184 void setPendingEvent(
NCursesEvent event) { pendingEvent = event;}
195 typedef unsigned NCDoptflag;
202 NCDialog( YDialogType dialogType,
const wpos & at,
bool boxed =
true );
204 bool isPopup()
const {
return ( ncdopts & POPUP ); }
206 bool isBoxed()
const {
return !( ncdopts & NOBOX ); }
208 virtual void initDialog();
212 return dlgstyle ? *dlgstyle : NCurses::style()[NCstyle::DefaultStyle];
223 void showHotkeyHelp();
virtual void activate()
Activate this dialog: Make sure that it is shown as the topmost dialog of this application and that i...
virtual void setEnabled(bool do_bv)
Pure virtual to make sure every widget implements it.
virtual YEvent * pollEventInternal()
Check if a user event is pending.
virtual void openInternal()
Internal open() method: Initialize what is left over to initialize after all dialog children have bee...
virtual YEvent * waitForEventInternal(int timeout_millisec)
Wait for a user event.