250 likes | 465 Views
FLTK Introduction. I4B 02 張博淳 I4B 04 黃貞雯. Let ’ s Download FLTK. FLTK Source : Download FLTK ( 網路硬碟二 分享名稱: FLTK) Open fltk-1.1.6->fluid-> fluidd.exe 連結. Using FLTK Open a Window. 1. File->New-> 命名為 * .fl 2. Press “Function”, then clear all to press “OK”
E N D
FLTK Introduction I4B 02 張博淳 I4B 04 黃貞雯
Let’s Download FLTK FLTK Source : • Download FLTK (網路硬碟二 分享名稱:FLTK) • Open fltk-1.1.6->fluid-> fluidd.exe 連結
Using FLTK Open a Window 1. File->New->命名為 *.fl 2. Press “Function”, then clear all to press “OK” • Press “Window” to adjust position and size. (fig 1) 4. File->Save, and File->Write code.
Using FLTK Open a Window Example : (fig 1)
FLTK Work Environment Add library : • Open VC • Press Tools->Options->Directories • Add “FLTK-1.1.6” to “Include files” and “FLTK-1.1.6\Lib” to “Library files”
Project Setting : • Use VC to open “ *.cxx ” • Press compile • Press Project->Setting
Select C/C++ • In Category select “Code Generation”
In Use run-time library select “Debug Multithreaded DLL”
How to use Button • Press “Button” and adjust its position and size • Click button to input label name
Use Button callback 3. Click button to input callback (eg. button_cb(); )
4. Press “Function” (Name : button_cb(), Type : void)
5. Press “F2” to put button_cb() up 6. Press “code” and “OK” 7. Press “Declaration” and input “#include <stdio.h>”, then put it up 8. File->Save, and File->Write code 9. Use VC to open .cxx file and run
Button Type • URL : Document->index.htm->3. Common Widgets and Attributes • Example : test\buttonsd.exe
Radio & Group • Example : test\radiod.exe
Button Enactive/Deactive • Example : test\inactived.exe
Box Type • URL : Document->index.htm->Box Types • Example : test\boxtyped.exe
Label • URL : Document->index.htm->Labels and Label Types • Example : test\symbolsd.exe, labeld.exe
Valuators • URL : Document->index.htm->3. Common Widgets and Attributes • Example : test\valuatorsd.exe
I/O • URL : Document->index.htm->A – Class Reference • Example : test\inputd.exe, outputd.exe • Notes : ^J = (Ctrl + J) to next line
Menu Bar • Example : test\menubard.exe