25 #define YUILogComponent "ncurses"
26 #include <yui/YUILog.h>
27 #include <yui/YDialog.h>
30 #include "NCPushButton.h"
33 NCPushButton::NCPushButton( YWidget * parent,
const std::string & nlabel )
34 : YPushButton( parent, nlabel )
37 yuiDebug() << std::endl;
43 NCPushButton::~NCPushButton()
45 yuiDebug() << std::endl;
49 int NCPushButton::preferredWidth()
51 wsze defsize = wGetDefsze();
52 return wGetDefsze().W;
56 int NCPushButton::preferredHeight()
58 return wGetDefsze().H;
65 YPushButton::setEnabled( do_bv );
69 void NCPushButton::setSize(
int newwidth,
int newheight )
71 wRelocate(
wpos( 0 ),
wsze( newheight, newwidth ) );
83 ret = NCursesEvent::Activated;
91 void NCPushButton::setLabel(
const std::string & nlabel )
95 defsze =
wsze( label.height(), label.width() + 2 );
96 YPushButton::setLabel( nlabel );
101 void NCPushButton::wRedraw()
108 win->
bkgd( style.plain );
112 if ( label.height() <= 1 )
122 label.drawAt( *win, style,
wpos( 0, 1 ),
wsze( -1, win->
width() - 2 ),
int printw(const char *fmt,...)
int bkgd(const chtype ch)