31 #include <ncursesw/etip.h>
32 #include <ncursesw/panel.h>
37 friend std::ostream & operator<<( std::ostream & Stream,
const NCursesPanel & Obj_Cv );
38 friend std::ostream & operator<<( std::ostream & Stream,
const NCursesPanel * Obj_Cv );
80 UserHook* uptr = ( UserHook* )::panel_userptr( p );
81 assert( uptr && uptr->m_back ==
this && uptr->m_owner == p );
85 void *get_user()
const
87 UserHook* uptr = ( UserHook* )::panel_userptr( p );
88 assert( uptr && uptr->m_back ==
this && uptr->m_owner == p );
92 static const NCursesPanel * get_Panel_of(
const PANEL & pan )
94 UserHook* uptr = ( UserHook* )::panel_userptr( &pan );
96 if ( uptr && uptr->m_owner == &pan
97 && uptr->m_back && uptr->m_back->p == &pan )
109 void OnError(
int err )
const THROWS( NCursesPanelException )
112 THROW(
new NCursesPanelException(
this, err ) );
143 ::wresize(
w, lines, columns );
144 return ::replace_panel( p,
w );
185 if ( ::panel_above( 0 ) != p )
187 OnError( ::bottom_panel( p ) );
193 OnError( ::move_panel( p, y, x ) );
202 return ( ::panel_hidden( p ) );
226 inline PANEL * PANEL_above()
const
228 return( p ? ::panel_above( p ) : 0 );
231 inline PANEL * PANEL_below()
const
233 return( p ? ::panel_below( p ) : 0 );
236 int transparent(
int y,
int x );
261 virtual void frame(
const char* title = NULL,
262 const char* btitle = NULL );
267 virtual void boldframe(
const char* title = NULL,
268 const char* btitle = NULL );
273 virtual void label(
const char* topLabel,
274 const char* bottomLabel );
301 const T* p_UserData = ( T* )0 )
325 return ( T* )get_user();
353 #endif // _NCURSESP_H
virtual void label(const char *topLabel, const char *bottomLabel)
NCursesPanel & above() const
NCursesUserPanel(const T *p_UserData=(T *) 0)
virtual void centertext(int row, const char *label)
virtual void frame(const char *title=NULL, const char *btitle=NULL)
void OnError(int err) const THROWS(NCursesPanelException)
Associate user data with a panel. We use templates to provide a typesafe mechanism to associate user ...
NCursesUserPanel(int lines, int cols, int begin_y=0, int begin_x=0, const T *p_UserData=(T *) 0)
NCursesPanel(int lines, int cols, int begin_y=0, int begin_x=0)
virtual int noutrefresh()
virtual void boldframe(const char *title=NULL, const char *btitle=NULL)
virtual int resize(int lines, int columns)
virtual void setUserData(const T *p_UserData)
static T * UserDataOf(const PANEL &pan)
void set_user(void *user)