Example
Recognizing QR Code JIS X 0510 In JavaUsing Barcode Control SDK for Java Control to generate, create, read, scan barcode image in Java applications.
pnoutrefresh(p,0, 0, 0, 0, 23,19); pnoutrefresh(p,24, 0, 0,24,23,43); pnoutrefresh(p,48, 0, 0,48,23, 67); doupdate();
QR Code Drawer In JavaUsing Barcode generator for Java Control to generate, create QR Code JIS X 0510 image in Java applications.
The pnoutrefresh() functions update portions of the pad p to various locations on the standard screen. The final doupdate() function updates the screen with the information.
Decode QR Code ISO/IEC18004 In JavaUsing Barcode reader for Java Control to read, scan read, scan image in Java applications.
Sample Program
Make Barcode In JavaUsing Barcode drawer for Java Control to generate, create bar code image in Java applications.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 #include <ncurses.h> int main(void) { WINDOW *pad; int a; initscr(); pad = newpad(40,100); if(pad == NULL) { endwin(); puts( Problem creating pad ); return(1); } for(a=0;a<4000;a++) { waddch(pad, A + (a % 26)); } prefresh(pad,0,0,7,30,17,50); wgetch(pad);
Bar Code Recognizer In JavaUsing Barcode decoder for Java Control to read, scan read, scan image in Java applications.
Appendix A
Quick Response Code Encoder In C#.NETUsing Barcode creation for Visual Studio .NET Control to generate, create QR Code ISO/IEC18004 image in .NET applications.
25 26 27 28 29 30 31 32 33
Generate QR Code In VS .NETUsing Barcode printer for ASP.NET Control to generate, create Quick Response Code image in ASP.NET applications.
NCurses Library Reference
Denso QR Bar Code Creator In .NETUsing Barcode creator for .NET Control to generate, create QR Code ISO/IEC18004 image in .NET framework applications.
mvwaddstr(pad,1,0, Hello, there! ); pnoutrefresh(pad,0,0,7,30,17,50); doupdate(); wgetch(pad); endwin(); return 0; }
Encode QR Code JIS X 0510 In Visual Basic .NETUsing Barcode maker for Visual Studio .NET Control to generate, create QR Code image in VS .NET applications.
Sample output: The output is the same as shown for prefresh() below, though after pressing the Enter key, the text Hello, there! appears on the second line.
GS1 - 12 Creation In JavaUsing Barcode creator for Java Control to generate, create Universal Product Code version A image in Java applications.
Also See
ECC200 Printer In JavaUsing Barcode generator for Java Control to generate, create Data Matrix image in Java applications.
newpad(), prefresh(), doupdate(), wnoutrefresh()
GTIN - 128 Generation In JavaUsing Barcode printer for Java Control to generate, create GTIN - 128 image in Java applications.
prefresh()
USPS PLANET Barcode Generator In JavaUsing Barcode encoder for Java Control to generate, create USPS Confirm Service Barcode image in Java applications.
The prefresh() function is used to display information stored in a pad structure to a window.
Barcode Generator In .NETUsing Barcode drawer for ASP.NET Control to generate, create barcode image in ASP.NET applications.
Explanation
Decode Universal Product Code Version A In .NETUsing Barcode scanner for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
Pads work like windows, though they re not displayed on the screen. To see the information put to a pad, the prefresh() function is used. Unlike the refresh() function, prefresh() takes a rectangle of text (and attributes) from the pad and places it in a window. This is how information from a pad is displayed.
Drawing Data Matrix 2d Barcode In .NETUsing Barcode generation for ASP.NET Control to generate, create DataMatrix image in ASP.NET applications.
Man Page Format
Encoding GS1-128 In VB.NETUsing Barcode encoder for .NET Control to generate, create EAN128 image in VS .NET applications.
int prefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol);
Encoding GTIN - 12 In Visual Studio .NETUsing Barcode generation for ASP.NET Control to generate, create UPC Symbol image in ASP.NET applications.
Format Reference
Data Matrix ECC200 Recognizer In .NET FrameworkUsing Barcode decoder for VS .NET Control to read, scan read, scan image in .NET applications.
pad is the name of a pad, a WINDOW pointer returned from the newpad() function.
Paint GTIN - 13 In .NETUsing Barcode generator for ASP.NET Control to generate, create EAN 13 image in ASP.NET applications.
Appendix A
NCurses Library Reference
pminrow and pmincol are int values represents the upper-left (Y and X) coordinates of a rectangle of text on the pad. sminrow and smincol are int values representing the upper-left (Y and X) coordinates of a rectangle of text on the standard screen. This location is where the text from the pad will be placed. smaxrow and smaxcol represent the lower-right (Y and X) coordinate of the rectangle on the standard screen. These are int values and they are relative to the home location, not to sminrow and smincol. The differences between the upper-left and lower-right coordinates on the screen are also used to calculate the size of the rectangle copied from the pad.
Return Value
OK or ERR depending on success or failure of the call.
Notes
prefresh() always outputs text to the standard screen. The prefresh() function updates the standard screen; there is no need to call refresh() after prefresh() to see the text. You cannot prefresh() a rectangle from the pad that is larger than the standard screen (or larger than the pad, for that matter).
Examples
prefresh(p,0,0,0,0,10,35);
The statement here places part of the pad p on the standard screen. The text from the pad starts at location 0, 0. The rectangle on the standard screen starts at location 0, 0, and it is 10 rows deep by 35 columns wide.
prefresh(psto,py,px,10,5,11,75);
Here, text from the pad psto is read from starting location py, px, and placed on the screen at location 10, 5. The rectangle is 1 row high and 70 characters wide.
Sample Program
1 2 3 #include <ncurses.h> int main(void)
Appendix A
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 {
NCurses Library Reference
WINDOW *pad; int a; initscr(); pad = newpad(40,100); if(pad == NULL) { endwin(); puts( Problem creating pad ); return(1); } for(a=0;a<4000;a++) { waddch(pad, A + (a % 26)); } prefresh(pad,0,0,7,30,17,50); wgetch(pad); endwin(); return 0; }
The sample output is shown in Figure A-9.
Also See
11, newpad()
Figure A-9: A square chunk of the pad appears on the terminal screen.
Appendix A
NCurses Library Reference
printw()
The printw() function is the NCurses equivalent to the standard C printf() function. Use printw() in your NCurses programs when you need printf().
Man Page Format
int int int int int int printw(const char *fmt, ...); wprintw(WINDOW *win, const char *fmt, ...); mvprintw(int y, int x, const char *fmt, ...); mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...); vw_printw(WINDOW *win, const char *fmt, va_list varglist); vwprintw(WINDOW *win, const char *fmt, va_list varglist);