FLTK widgets and functions


Classes

class  ExpandableGroup
 A group with applied layout on childs. More...
class  MessageBox
 Standard dialog. More...
class  SevenSeg
 Digital number widget. More...
class  Theme
 Theming for FLTK and edelib widgets. More...
class  Window
 Window class. More...

Enumerations

enum  MessageBoxType { MSGBOX_PLAIN = 0, MSGBOX_INPUT, MSGBOX_INPUT_SECRET }
 Type of MessageBox dialog. More...
enum  MessageBoxButtonType { MSGBOX_BUTTON_PLAIN = 0, MSGBOX_BUTTON_RETURN }
 Type of added button to MessageBox class. More...
enum  MessageBoxIconType {
  MSGBOX_ICON_TYPE_INFO = 0, MSGBOX_ICON_TYPE_ALERT, MSGBOX_ICON_TYPE_QUESTION, MSGBOX_ICON_TYPE_INPUT,
  MSGBOX_ICON_TYPE_PASSWORD
}
 Type of the icon in message box. More...
enum  WindowComponents { WIN_INIT_NONE = (1 << 1), WIN_INIT_ICON_THEME = (1 << 2), WIN_INIT_IMAGES = (1 << 3), WIN_INIT_ALL = (WIN_INIT_ICON_THEME | WIN_INIT_IMAGES) }
 Components used to be loaded with the window. More...

Functions

int font_chooser (const char *name, const char *family, int &retsize, const char *default_name=0, int default_size=0)
String icon_chooser (const char *dir)
String icon_chooser (IconSizes sz, IconContext ctx=ICON_CONTEXT_ANY)
void clear_dialog_icons (void)
void window_xid_create (Fl_Window *win, void(*before_map_func)(Fl_Window *)=((void *) 0), int background_pixel=-1)

Enumeration Type Documentation

enum MessageBoxButtonType

Type of added button to MessageBox class.

Enumerator:
MSGBOX_BUTTON_PLAIN  Ordinary button (Fl_Button).
MSGBOX_BUTTON_RETURN  Button with 'enter' shortcut (Fl_Return_Button).

enum MessageBoxIconType

Type of the icon in message box.

Enumerator:
MSGBOX_ICON_TYPE_INFO  Info-like icon.
MSGBOX_ICON_TYPE_ALERT  Alert-like icon.
MSGBOX_ICON_TYPE_QUESTION  Question-like icon.
MSGBOX_ICON_TYPE_INPUT  Input-like icon.
MSGBOX_ICON_TYPE_PASSWORD  Password-like icon.

enum MessageBoxType

Type of MessageBox dialog.

Enumerator:
MSGBOX_PLAIN  Plain dialog.
MSGBOX_INPUT  Dialog with input field.
MSGBOX_INPUT_SECRET  Dialog with secret input field.

enum WindowComponents

Components used to be loaded with the window.

Enumerator:
WIN_INIT_NONE  Do not load anything except XSETTINGS code.
WIN_INIT_ICON_THEME  Load IconTheme code.
WIN_INIT_IMAGES  Call fl_register_images.
WIN_INIT_ALL  Load above.


Function Documentation

void edelib::clear_dialog_icons ( void   ) 

int edelib::font_chooser ( const char *  name,
const char *  family,
int &  retsize,
const char *  default_name = 0,
int  default_size = 0 
)

font_chooser() is a dialog for choosing fonts. After this function was called, it will display a dialog with available fonts and their sizes and will wait untill user choose an action.

If user canceled it (or it was closed) it will return -1 and retsize will be set to -1.

Note that dialog returns (besides font size), integer value for font name, so it can be directly used by FLTK. Returned value is not valuable for end user (e.g. when you want to display it in some dialog), so you must use Fl::get_font_name((Fl_Font)returned_value, 0) to obtain stringized name (e.g. helvetica, courier, etc.)

Returns:
font name as integere, known to FLTK
Parameters:
name is titlebar
family is family of fonts (like ISO8859-1). If given NULL, it will use ISO8859-1; if given -* will get all fonts with any encoding as long as they have normal X font names with dashes in them; if given * will get every font that exists.
retsize if not NULL will return selected font size
default_name if not NULL will select given font name
default_size if greater than 0 will select font size

String edelib::icon_chooser ( IconSizes  sz,
IconContext  ctx = ICON_CONTEXT_ANY 
)

The same as icon_chooser() with parameters, except it will use currently loaded theme.

Note:
This function will assuem IconTheme::init(...) was previously called and if not, it will show empty dialog. The best way to use it is either to use Window class or to call it by self.
Returns:
full path to choosed icon or empty string if theme was not loaded or pressed Cancel
Parameters:
sz is icon size
ctx is icon context

String edelib::icon_chooser ( const char *  dir  ) 

icon_chooser() is a dialog containing a list of visible icons so user can choose desired one. Given directory will be scanned for known image/icon types and those will be shown.

If given path does not exists, or directory is not readable, empty dialog will be shown.

icon_chooser.jpg

Note:
icon_chooser() will skip those icons who's size is grater than 128 pixels, width or height.
Returns:
full path to choosed icon, or empty string if directory is inaccessible, or pressed Cancel
Parameters:
dir a path to directory that contains icons
Todo:
icon_chooser() pretty sucks; writte better one

void edelib::window_xid_create ( Fl_Window *  win,
void(*)(Fl_Window *)  before_map_func = ((void *) 0),
int  background_pixel = -1 
)

This function is intended to be used inside inherited show() member (from Fl_Window familly) and do the same job as Fl_X::make_xid(). The main difference is that it will call before_map_func() (if given) before window is actually mapped.

This is usefull for cases when window data must exists (when FLTK creates them) so some properties can be set before mapping on the screen (actually these properties can be set after window was mapped but many window managers, panels, etc. will not be notified correctly and will not use them; of course not all properies must be set before window was mapped, but for those that must, this function is intended).

In short, if you have not clue what I was talking about, then you don't need this function at all ;-).


Generated on Thu Dec 24 05:12:27 2009 for edelib by  doxygen 1.5.9