Anda di halaman 1dari 4

10/8/2014 NCURSES Programming HOWTO

http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ 1/4
NCURSESProgrammingHOWTO
PradeepPadala
<ppadala@gmail.com>
v1.9,20050620
RevisionHistory
Revision1.9 20050620 Revisedby:ppadala
ThelicensehasbeenchangedtotheMITstylelicenseusedbyNCURSES.Notethattheprogramsare
alsorelicensedunderthis.
Revision1.8 20050617 Revisedby:ppadala
Lotsofupdates.Addedreferencesandperlexamples.Changestoexamples.Manygrammaticaland
stylisticchangestothecontent.ChangestoNCURSEShistory.
Revision1.7.1 20020625 Revisedby:ppadala
AddedaREADMEfileforbuildingandinstructionsforbuildingfromsource.
Revision1.7 20020625 Revisedby:ppadala
Added"Otherformats"sectionandmadealotoffancychangestotheprograms.Inliningofprogramsis
gone.
Revision1.6.1 20020224 Revisedby:ppadala
RemovedtheoldChangelogsection,cleanedthemakefiles
Revision1.6 20020216 Revisedby:ppadala
Correctedalotofspellingmistakes,addedACSvariablessection
Revision1.5 20020105 Revisedby:ppadala
ChangedstructuretopresentproperTOC
Revision1.3.1 20010726 Revisedby:ppadala
Correctedmaintainersparagraph,Correctedstablereleasenumber
Revision1.3 20010724 Revisedby:ppadala
Addedcopyrightnoticestomaindocument(LDPlicense)andprograms(GPL),Corrected
printw_example.
Revision1.2 20010605 Revisedby:ppadala
Incorporatedravi'schanges.Mainlytointroduction,menu,form,justforfunsections
Revision1.1 20010522 Revisedby:ppadala
Added"awordaboutwindow"section,Addedscanw_example.
Thisdocumentisintendedtobean"AllinOne"guideforprogrammingwithncursesanditssister
libraries.Wegraduatefromasimple"HelloWorld"programtomorecomplexformmanipulation.No
priorexperienceinncursesisassumed.Sendcommentstothisaddress
TableofContents
1.Introduction
10/8/2014 NCURSES Programming HOWTO
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ 2/4
1.1.WhatisNCURSES?
1.2.WhatwecandowithNCURSES
1.3.Wheretogetit
1.4.Purpose/Scopeofthedocument
1.5.AboutthePrograms
1.6.OtherFormatsofthedocument
1.7.Credits
1.8.WishList
1.9.Copyright
2.HelloWorld!!!
2.1.CompilingWiththeNCURSESLibrary
2.2.Dissection
3.TheGoryDetails
4.Initialization
4.1.Initializationfunctions
4.2.raw()andcbreak()
4.3.echo()andnoecho()
4.4.keypad()
4.5.halfdelay()
4.6.MiscellaneousInitializationfunctions
4.7.AnExample
5.AWordaboutWindows
6.Outputfunctions
6.1.addch()classoffunctions
6.2.mvaddch(),waddch()andmvwaddch()
6.3.printw()classoffunctions
6.4.addstr()classoffunctions
6.5.Awordofcaution
7.Inputfunctions
7.1.getch()classoffunctions
7.2.scanw()classoffunctions
7.3.getstr()classoffunctions
7.4.Someexamples
8.Attributes
8.1.Thedetails
8.2.attron()vsattrset()
8.3.attr_get()
8.4.attr_functions
8.5.wattrfunctions
8.6.chgat()functions
9.Windows
10/8/2014 NCURSES Programming HOWTO
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ 3/4
9.1.Thebasics
9.2.LettherebeaWindow!!!
9.3.Explanation
9.4.Theotherstuffintheexample
9.5.OtherBorderfunctions
10.Colors
10.1.Thebasics
10.2.ChangingColorDefinitions
10.3.ColorContent
11.Interfacingwiththekeyboard
11.1.TheBasics
11.2.ASimpleKeyUsageexample
12.Interfacingwiththemouse
12.1.TheBasics
12.2.Gettingtheevents
12.3.PuttingitallTogether
12.4.MiscellaneousFunctions
13.ScreenManipulation
13.1.getyx()functions
13.2.ScreenDumping
13.3.WindowDumping
14.Miscellaneousfeatures
14.1.curs_set()
14.2.TemporarilyLeavingCursesmode
14.3.ACS_variables
15.Otherlibraries
16.PanelLibrary
16.1.TheBasics
16.2.CompilingWiththePanelsLibrary
16.3.PanelWindowBrowsing
16.4.UsingUserPointers
16.5.MovingandResizingPanels
16.6.HidingandShowingPanels
16.7.panel_above()andpanel_below()Functions
17.MenusLibrary
17.1.TheBasics
17.2.CompilingWiththeMenuLibrary
17.3.MenuDriver:Theworkhorseofthemenusystem
10/8/2014 NCURSES Programming HOWTO
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/ 4/4
17.4.MenuWindows
17.5.ScrollingMenus
17.6.MultiColumnarMenus
17.7.MultiValuedMenus
17.8.MenuOptions
17.9.TheusefulUserPointer
18.FormsLibrary
18.1.TheBasics
18.2.CompilingWiththeFormsLibrary
18.3.PlayingwithFields
18.4.FormWindows
18.5.FieldValidation
18.6.FormDriver:Theworkhorseoftheformssystem
19.ToolsandWidgetLibraries
19.1.CDK(CursesDevelopmentKit)
19.2.Thedialog
19.3.PerlCursesModulesCURSES::FORMandCURSES::WIDGETS
20.JustForFun!!!
20.1.TheGameofLife
20.2.MagicSquare
20.3.TowersofHanoi
20.4.QueensPuzzle
20.5.Shuffle
20.6.TypingTutor
21.References
Next
Introduction

Anda mungkin juga menyukai