ui/curswa.h File Reference

Holds workarounds for curses.h. More...

Go to the source code of this file.

Enumerations

enum  { KEY_REFRESH = 12 }

Functions

int _mvwchgat_ (WINDOW *w, int y, int x, int n, int attr, short color, const void *)
void * alloca (size_t)
int box (WINDOW *win, int verch, int horch)
int clear ()
int erase ()
int move (int y, int x)
int mvwaddnstr_c (WINDOW *win, int y, int x, const char *str, int n)
int mvwaddstr_c (WINDOW *win, int y, int x, const char *str)
int refresh ()
int waddstr_c (WINDOW *win, const char *str)


Detailed Description

Holds workarounds for curses.h when compiling under C++. It specifically removes the macros:

and replaces them by inline functions.

It also defines certain inline functions for dealing with const char* arguments. Some curses functions simply use char* which doesn't go along well with std::string::c_str(). The defined functions do have the same syntax as their cousins.

The configure script figures out which one to use.

The following functions are defined to handle const char* arguments

mvwchgat is also defined as inline function in case the curses library does not provide it. The configure script takes care of figuring whether or not the function is provided by the curses library.

Please note that this file has to be included after the (n)curses header file.

Definition in file curswa.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
KEY_REFRESH  The value returned by [w]getch() when the user presses ^L.

Definition at line 70 of file curswa.h.


Function Documentation

int _mvwchgat_ ( WINDOW *  w,
int  y,
int  x,
int  n,
int  attr,
short  color,
const void *   
) [inline]

Definition at line 203 of file curswa.h.

References alloca().

void* alloca ( size_t   ) 

int box ( WINDOW *  win,
int  verch,
int  horch 
) [inline]

int clear (  )  [inline]

Definition at line 96 of file curswa.h.

Referenced by YAPETUI::BaseWindow::endCurses().

int erase (  )  [inline]

Definition at line 103 of file curswa.h.

int move ( int  y,
int  x 
) [inline]

Definition at line 110 of file curswa.h.

int mvwaddnstr_c ( WINDOW *  win,
int  y,
int  x,
const char *  str,
int  n 
) [inline]

Definition at line 172 of file curswa.h.

int mvwaddstr_c ( WINDOW *  win,
int  y,
int  x,
const char *  str 
) [inline]

Definition at line 152 of file curswa.h.

int refresh (  )  [inline]

Definition at line 117 of file curswa.h.

Referenced by MainWindow::openFile(), and YAPETUI::InputWidget::setText().

int waddstr_c ( WINDOW *  win,
const char *  str 
) [inline]

Definition at line 132 of file curswa.h.


Generated on Thu Jun 11 19:12:59 2009 for YAPET by  doxygen 1.5.8