fltk introduction

Post on 04-Jan-2016

62 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

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” - PowerPoint PPT Presentation

TRANSCRIPT

FLTK Introduction

I4B 02 張博淳I4B 04 黃貞雯

Let’s Download FLTK

FLTK Source :1. Download FLTK

( 網路硬碟二 分享名稱: FLTK)

2. 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”

3. 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 :1. Use VC to open “ *.cxx ”

2. Press compile

3. Press Project->Setting

4. Select C/C++

5. In Category select “Code Generation”

6. In Use run-time library select “Debug Multithreaded DLL”

7. Press OK, then build and run

How to use Button

1. Press “Button” and adjust its position and size

2. 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

Example :

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

Example : Calculator

Menu Bar

Example : test\menubard.exe

top related