Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>NCURSES</strong> <strong>ile</strong> Yazılım Geli¸stirme <strong>NASIL</strong><br />
/* Ekrana göster */<br />
attron(COLOR_PAIR(4));<br />
mvprintw(LINES – 3, 0,<br />
"Ta¸sımak için ’m’ , yeniden boyutlandırma için ’r’ kullanın");<br />
mvprintw(LINES – 2, 0,<br />
"Pencereler arasında gezinmek için tab kullanın (Çıkmak için F1)");<br />
attroff(COLOR_PAIR(4));<br />
doupdate();<br />
stack_top = my_panels[2];<br />
top = (PANEL_DATA *)panel_userptr(stack_top);<br />
newx = top–>x;<br />
newy = top–>y;<br />
neww = top–>w;<br />
newh = top–>h;<br />
wh<strong>ile</strong>((ch = getch()) != KEY_F(1))<br />
{ switch(ch)<br />
{ case 9: /* Tab */<br />
top = (PANEL_DATA *)panel_userptr(stack_top);<br />
top_panel(top–>next);<br />
stack_top = top–>next;<br />
top = (PANEL_DATA *)panel_userptr(stack_top);<br />
newx = top–>x;<br />
newy = top–>y;<br />
neww = top–>w;<br />
newh = top–>h;<br />
break;<br />
case ’r’: /* Yeniden boyutlandır */<br />
size = TRUE;<br />
attron(COLOR_PAIR(4));<br />
mvprintw(LINES – 4, 0,<br />
"Yeniden boyutlandırmaya giri¸s: "<br />
"Ok tu¸sları <strong>ile</strong> boyutlandırın ve "<br />
"bitirmek için kullanın");<br />
refresh();<br />
attroff(COLOR_PAIR(4));<br />
break;<br />
case ’m’: /* Move */<br />
attron(COLOR_PAIR(4));<br />
mvprintw(LINES – 4, 0,<br />
"Ta¸sıma kipine girildi: "<br />
"Ta¸sımak için ok tu¸slarını ve "<br />
"bitirmek için kullanın");<br />
refresh();<br />
attroff(COLOR_PAIR(4));<br />
move = TRUE;<br />
break;<br />
case KEY_LEFT:<br />
if(size == TRUE)<br />
{ ––newx;<br />
++neww;<br />
}<br />
if(move == TRUE)<br />
––newx;<br />
break;<br />
case KEY_RIGHT:<br />
if(size == TRUE)<br />
http://belgeler.org Linux Kitaplı˘gı 44 / 90