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

FLTK Introduction

  • Upload
    mareo

  • View
    51

  • Download
    1

Embed Size (px)

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

Citation preview

Page 1: FLTK Introduction

FLTK Introduction

I4B 02 張博淳I4B 04 黃貞雯

Page 2: FLTK Introduction

Let’s Download FLTK

FLTK Source :1. Download FLTK

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

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

連結

Page 3: FLTK Introduction

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

Using FLTK Open a Window

Example :

(fig 1)

Page 5: FLTK Introduction

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

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

2. Press compile

3. Press Project->Setting

Page 7: FLTK Introduction

4. Select C/C++

5. In Category select “Code Generation”

Page 8: FLTK Introduction

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

Page 9: FLTK Introduction

7. Press OK, then build and run

Page 10: FLTK Introduction

How to use Button

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

2. Click button to input label name

Page 11: FLTK Introduction

Use Button callback

3. Click button to input callback

(eg. button_cb(); )

Page 12: FLTK Introduction

4. Press “Function”

(Name : button_cb(), Type : void)

Page 13: FLTK Introduction

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

Example :

Page 15: FLTK Introduction

Button Type

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

Example : test\buttonsd.exe

Page 16: FLTK Introduction

Radio & Group

Example : test\radiod.exe

Page 17: FLTK Introduction

Button Enactive/Deactive

Example : test\inactived.exe

Page 18: FLTK Introduction

Box Type

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

Page 19: FLTK Introduction

Label

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

Example : test\symbolsd.exe, labeld.exe

Page 20: FLTK Introduction

Valuators

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

Example : test\valuatorsd.exe

Page 21: FLTK Introduction

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

Example : Calculator

Page 23: FLTK Introduction

Menu Bar

Example : test\menubard.exe