FLTK Introduction I4B 02 張博淳 I4B 04 黃貞雯. Let ’ s Download FLTK FLTK Source : 1....

23
FLTK Introduction I4B 02 張張張 I4B 04 張張張

Transcript of FLTK Introduction I4B 02 張博淳 I4B 04 黃貞雯. Let ’ s Download FLTK FLTK Source : 1....

Page 1: 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.

FLTK Introduction

I4B 02 張博淳I4B 04 黃貞雯

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

Let’s Download FLTK

FLTK Source :1. Download FLTK

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

2. Open fltk-1.1.6->fluid-> fluidd.exe

連結

Page 3: 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.

Page 4: 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

Example :

(fig 1)

Page 5: 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.

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”

Page 6: 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.

Project Setting :1. Use VC to open “ *.cxx ”

2. Press compile

3. Press Project->Setting

Page 7: 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.

4. Select C/C++

5. In Category select “Code Generation”

Page 8: 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.

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

Page 9: 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.

7. Press OK, then build and run

Page 10: 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.

How to use Button

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

2. Click button to input label name

Page 11: 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.

Use Button callback

3. Click button to input callback

(eg. button_cb(); )

Page 12: 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.

4. Press “Function”

(Name : button_cb(), Type : void)

Page 13: 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.

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

Page 14: 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.

Example :

Page 15: 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.

Button Type

URL : Document->index.htm->3. Common Widgets and Attributes

Example : test\buttonsd.exe

Page 16: 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.

Radio & Group

Example : test\radiod.exe

Page 17: 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.

Button Enactive/Deactive

Example : test\inactived.exe

Page 18: 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.

Box Type

URL : Document->index.htm->Box Types Example : test\boxtyped.exe

Page 19: 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.

Label

URL : Document->index.htm->Labels and Label Types

Example : test\symbolsd.exe, labeld.exe

Page 20: 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.

Valuators

URL : Document->index.htm->3. Common Widgets and Attributes

Example : test\valuatorsd.exe

Page 21: 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.

I/O

URL : Document->index.htm->A – Class Reference

Example : test\inputd.exe, outputd.exe Notes : ^J = (Ctrl + J) to next line

Page 22: 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.

Example : Calculator

Page 23: 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.

Menu Bar

Example : test\menubard.exe