18.02.2013 Views

NCURSES ile Yazılım Geli¸stirme NASIL

NCURSES ile Yazılım Geli¸stirme NASIL

NCURSES ile Yazılım Geli¸stirme NASIL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>NCURSES</strong> <strong>ile</strong> Yazılım Geli¸stirme <strong>NASIL</strong><br />

p_win–>height = 3;<br />

p_win–>width = 10;<br />

p_win–>starty = (LINES – p_win–>height)/2;<br />

p_win–>startx = (COLS – p_win–>width)/2;<br />

p_win–>border.ls = ’|’;<br />

p_win–>border.rs = ’|’;<br />

p_win–>border.ts = ’–’;<br />

p_win–>border.bs = ’–’;<br />

p_win–>border.tl = ’+’;<br />

p_win–>border.tr = ’+’;<br />

p_win–>border.bl = ’+’;<br />

p_win–>border.br = ’+’;<br />

}<br />

void print_win_params(WIN *p_win)<br />

{<br />

#ifdef _DEBUG<br />

mvprintw(25, 0, "%d %d %d %d", p_win–>startx, p_win–>starty,<br />

p_win–>width, p_win–>height);<br />

refresh();<br />

#endif<br />

}<br />

void create_box(WIN *p_win, bool flag)<br />

{ int i, j;<br />

int x, y, w, h;<br />

}<br />

x = p_win–>startx;<br />

y = p_win–>starty;<br />

w = p_win–>width;<br />

h = p_win–>height;<br />

if(flag == TRUE)<br />

{ mvaddch(y, x, p_win–>border.tl);<br />

mvaddch(y, x + w, p_win–>border.tr);<br />

mvaddch(y + h, x, p_win–>border.bl);<br />

mvaddch(y + h, x + w, p_win–>border.br);<br />

mvhline(y, x + 1, p_win–>border.ts, w – 1);<br />

mvhline(y + h, x + 1, p_win–>border.bs, w – 1);<br />

mvvline(y + 1, x, p_win–>border.ls, h – 1);<br />

mvvline(y + 1, x + w, p_win–>border.rs, h – 1);<br />

}<br />

else<br />

for(j = y; j

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!