//
// "$Id: Fl.H 8548 2011-03-30 12:07:52Z AlbrechtS $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
/** \file
Fl static class.
*/
#ifndef Fl_H
# define Fl_H
#ifdef FLTK_HAVE_CAIRO
# include <FL/Fl_Cairo.H>
#endif
# include "fl_utf8.h"
# include "Enumerations.H"
# ifndef Fl_Object
# define Fl_Object Fl_Widget /**< for back compatibility - use Fl_Widget! */
# endif
# ifdef check
# undef check
# endif
class Fl_Widget;
class Fl_Window;
class Fl_Image;
struct Fl_Label;
/** \defgroup callback_functions Callback function typedefs
\brief Typedefs defined in <FL/Fl.H> for callback or handler functions passed as function parameters.
FLTK uses callback functions as parameters for some function calls, e.g. to
set up global event handlers (Fl::add_handler()), to add a timeout handler
(Fl::add_timeout()), and many more.
The typedefs defined in this group describe the function parameters used to set
up or clear the callback functions and should also be referenced to define the
callback function to handle such events in the user's code.
\see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(),
Fl::remove_timeout() and others
@{ */
/** Signature of some label drawing functions passed as parameters */
typedef void (Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int h, Fl_Align align);
/** Signature of some label measurement functions passed as parameters */
typedef void (Fl_Label_Measure_F)(const Fl_Label *label, int &width, int &height);
/** Signature of some box drawing functions passed as parameters */
typedef void (Fl_Box_Draw_F)(int x, int y, int w, int h, Fl_Color color);
/** Signature of some timeout callback functions passed as parameters */
typedef void (*Fl_Timeout_Handler)(void *data);
/** Signature of some wakeup callback functions passed as parameters */
typedef void (*Fl_Awake_Handler)(void *data);
/** Signature of add_idle callback functions passed as parameters */
typedef void (*Fl_Idle_Handler)(void *data);
/** Signature of set_idle callback functions passed as parameters */
typedef void (*Fl_Old_Idle_Handler)();
/** Signature of add_fd functions passed as parameters */
typedef void (*Fl_FD_Handler)(int fd, void *data);
/** Signature of add_handler functions passed as parameters */
typedef int (*Fl_Event_Handler)(int event);
/** Signature of set_abort functions passed as parameters */
typedef void (*Fl_Abort_Handler)(const char *format,...);
/** Signature of set_atclose functions passed as parameters */
typedef void (*Fl_Atclose_Handler)(Fl_Window *window, void *data);
/** Signature of args functions passed as parameters */
typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i);
/** Signature of event_dispatch functions passed as parameters.
\see Fl::event_dispatch(Fl_Event_Dispatch) */
typedef int (*Fl_Event_Dispatch)(int event, Fl_Window *w);
/** @} */ /* group callback_functions */
/**
The Fl is the FLTK global (static) class containing
state information and global methods for the current application.
*/
class FL_EXPORT Fl {
Fl() {}; // no constructor!
public: // should be private!
#ifndef FL_DOXYGEN
static int e_number;
static int e_x;
static int e_y;
static int e_x_root;
static int e_y_root;
static int e_dx;
static int e_dy;
static int e_state;
static int e_clicks;
static int e_is_click;
static int e_keysym;
static char* e_text;
static int e_length;
static Fl_Event_Dispatch e_dispatch;
static Fl_Widget* belowmouse_;
static Fl_Widget* pushed_;
static Fl_Widget* focus_;
static int damage_;
static Fl_Widget* selection_owner_;
static Fl_Window* modal_;
static Fl_Window* grab_;
static int compose_state;
#endif
/**
If true then flush() will do something.
*/
static void damage(int d) {damage_ = d;}
public:
/** Enumerator for global FLTK options.
These options can be set system wide, per user, or for the running
application only.
\see Fl::option(Fl_Option, bool)
\see Fl::option(Fl_Option)
*/
typedef enum {
/// When switched on, moving the text cursor beyond the start or end of
/// a text in a text widget will change focus to the next text widget.
/// When switched off, the cursor will stop at the end of the text.
/// Pressing Tab or Ctrl-Tab will advance the keyboard focus.
OPTION_ARROW_FOCUS = 0,
// When switched on, FLTK will use the file chooser dialog that comes
// with your operating system whenever possible. When switched off, FLTK
// will present its own file chooser.
// \todo implement me
// OPTION_NATIVE_FILECHOOSER,
// When Filechooser Preview is enabled, the FLTK or native file chooser
// will show a preview of a selected file (if possible) before the user
// decides to choose the file.
// \todo implement me
//OPTION_FILECHOOSER_PREVIEW,
/// If visible focus is switched on, FLTK will draw a dotted rectangle
/// inside the widget that will receive the next keystroke. If switched
/// off, no such indicator will be drawn and keyboard navigation
/// is disabled.
OPTION_VISIBLE_FOCUS,
/// If text drag-and-drop is enabled, the user can select and drag text
/// from any text widget. If disabled, no dragging is possible, however
/// dropping text from other applications still works.
OPTION_DND_TEXT,
/// If tooltips are enabled, hovering the mouse over a widget with a
/// tooltip text will open a little tooltip window until the mouse leaves
/// the widget. If disabled, no tooltip is shown.
OPTION_SHOW_TOOLTIPS,
// don't change this, leave it always as the last element
/// For internal use only.
OPTION_LAST
} Fl_Option;
private:
static unsigned char options_[OPTION_LAST];
static unsigned char options_read_;
public:
/*
Return a global setting for all FLTK applications, possibly overridden
by a setting specifically for this application.
*/
static bool option(Fl_Option opt);
/*
Override an option while the application is running.
*/
static void option(Fl_Option opt, bool val);
/**
The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
This is now used as part of a higher level system allowing multiple
idle callback functions to be called.
\see add_idle(), remove_idle()
*/
static void (*idle)();
#ifndef FL_DOXYGEN
static Fl_Awake_Handler *awake_ring_;
static void **awake_data_;
static int awake_ring_size_;
static int awake_ring_head_;
static int awake_ring_tail_;
static const char* scheme_;
static Fl_Image* scheme_bg_;
static int e_original_keysym; // late addition
static int scrollbar_size_;
#endif
static int add_awake_handler_(Fl_Awake_Handler, void*);
static int get_awake_handler_(Fl_Awake_Handler&, void*&);
public:
// API version number
static double version();
// argument parsers:
static int arg(int argc, char **argv, int& i);
static int args(int argc
没有合适的资源?快使用搜索试试~ 我知道了~
FLTK三个版本源码及测试例子
共522个文件
h:456个
a:12个
cpp:6个
4星 · 超过85%的资源 需积分: 10 14 下载量 41 浏览量
2011-04-06
16:37:49
上传
评论
收藏 11.71MB RAR 举报
温馨提示
2011.04.06 By pafone fltk-1.1.10-source.tar.gz fltk-2.0.x-alpha-r8550.tar.gz fltk-1.3.x-r8550.tar.gz 及对应三个版本的Linux下测试例子,其中的VS工程只是组织代码用,并没有对应windows下的版本。其中用到的库参考里面的Makefile
资源推荐
资源详情
资源评论
收起资源包目录
FLTK三个版本源码及测试例子 (522个子文件)
libfltk.a 1.32MB
libfltk2.a 1.15MB
libfltk.a 812KB
libfltk_gl.a 121KB
libfltk_gl.a 112KB
libfltk_images.a 68KB
libfltk_images.a 65KB
libfltk2_images.a 61KB
libfltk_forms.a 25KB
libfltk2_gl.a 24KB
libfltk_forms.a 22KB
libfltk2_glut.a 17KB
hello.cpp 1KB
hello.cpp 1KB
fltktest.cpp 951B
hello.cpp 465B
fltktest.cpp 413B
fltktest.cpp 413B
fltk-1.3.x-r8550.tar.gz 4MB
fltk-2.0.x-alpha-r8550.tar.gz 3.05MB
fltk-1.1.10-source.tar.gz 2.54MB
Fl.H 44KB
Fl_Widget.H 37KB
Enumerations.H 37KB
Fl_Tree.H 35KB
forms.h 33KB
forms.H 33KB
forms.H 33KB
forms.H 33KB
Fl_Table.H 33KB
fl_draw.H 32KB
Fl_Text_Buffer.H 27KB
Fl_Device.H 24KB
Fl_Window.H 17KB
glut.H 16KB
glut.H 16KB
glut.h 16KB
Fl_Menu_Item.H 16KB
Fl_Text_Display.H 16KB
Fl_Input_.H 16KB
Enumerations.H 14KB
Fl_Browser_.H 14KB
Fl_Help_View.H 13KB
events.h 12KB
Fl_Browser.H 12KB
TextDisplay.h 12KB
Fl_Text_Display.H 12KB
Fl_Text_Buffer.H 11KB
Enumerations.H 11KB
TextBuffer.h 11KB
Widget.h 11KB
Fl_Tree_Item.H 11KB
Fl_Tree_Prefs.H 10KB
Fl_PostScript.H 10KB
Fl_Native_File_Chooser.H 10KB
Fl.H 10KB
fl_utf8.h 9KB
Fl_Preferences.H 9KB
Fl_Input.H 9KB
SharedImage.h 8KB
fl_draw.H 8KB
mac.H 8KB
Fl_Spinner.H 8KB
Fl_Gl_Window.H 8KB
FileChooser.h 8KB
fl_draw.H 8KB
Fl_Input_Choice.H 8KB
Fl_Widget.H 7KB
draw.h 7KB
Fl_File_Chooser.H 7KB
Fl_Scroll.H 7KB
Browser.h 7KB
Fl_Printer.H 7KB
x.H 7KB
Fl_Image.H 7KB
Fl_Help_View.H 7KB
Fl_Group.H 7KB
Style.h 6KB
Fl_Menu_.H 6KB
win32.h 6KB
HelpView.h 6KB
filename.H 6KB
Fl_File_Chooser.H 6KB
Fl_Spinner.H 6KB
win32.H 6KB
Fl_Table_Row.H 6KB
Fl_Color_Chooser.H 6KB
Fl_Button.H 6KB
Fl_Menu_Item.H 6KB
Fl_Menu_Item.H 6KB
win32.H 6KB
Fl_Input_Choice.H 6KB
Fl_Valuator.H 5KB
Threads.h 5KB
Menu.h 5KB
Fl_Text_Editor.H 5KB
Fl_Browser_.H 5KB
x11.h 5KB
Flags.h 5KB
filename.h 5KB
共 522 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- weiskysong2014-06-30对与我不太适用,不过还是谢谢分享
pafone
- 粉丝: 18
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- JavaScript《基于jq开发的数学公式插件,可随意嵌入web中》+源代码
- 短视频MD5批量修改工具:Python编程技巧应用,文件哈希值一键快速变更,实现内容唯一性校验
- Springboot开发基于springboot的快速web项目.zip
- Redis开发基于redis实现高并发异步秒杀点评项目.zip
- Kotlin 进行 Android 开发的开源库,扩展,工具,开源项目
- MATLAB《基于FMCW雷达的多天线定位系统》+源代码+文档说明
- QT开发基于QT开发的文件拷贝工具.zip
- 单片机开发基于51单片机的温度报警器.zip
- 深度学习相关,主要是做胶水开发,也有部分是完全原创.zip
- Object-C模板项目,基于其上派生实用项目
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功