From a7769752395a5496f198672ad6810b8bb525d304 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 24 Aug 2006 11:41:22 +0000 Subject: All fl_ functions indexed and linked. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5352 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/common.html | 15 +++ documentation/drawing.html | 89 +++++++++++-- documentation/functions.html | 298 +++++++++++++++++++++++++++++++++---------- documentation/osissues.html | 38 +++++- 4 files changed, 364 insertions(+), 76 deletions(-) (limited to 'documentation') diff --git a/documentation/common.html b/documentation/common.html index 9c2084de6..421ea723c 100644 --- a/documentation/common.html +++ b/documentation/common.html @@ -318,6 +318,15 @@ void xyz_draw(int x, int y, int w, int h, Fl_Color c) { } +

Fl_Boxtype fl_down(Fl_Boxtype)

+ +

fl_down returns the "pressed" or "down" version of a box. + +

Fl_Boxtype fl_frame(Fl_Boxtype)

+ +

fl_frame returns the unfilled, frame-only version of a box. +See also: fl_frame drawing. +

Adding Your Box Type

The Fl::set_boxtype() method adds or replaces the @@ -528,6 +537,12 @@ int fl_add_symbol(const char *name, void (*drawit)(Fl_Color), int scalable) must be set to 1 if the symbol is generated using scalable vector drawing functions.

+ + +

This function draw a named symbol fitting the given rectangle. +

Callbacks

Callbacks are functions that are called when the value of a diff --git a/documentation/drawing.html b/documentation/drawing.html index 9e3b6e0b0..26e8d7940 100644 --- a/documentation/drawing.html +++ b/documentation/drawing.html @@ -64,6 +64,8 @@ following types of drawing functions:

  • Overlay
  • +
  • Offscreen Drawing
  • +

    Boxes

    @@ -92,6 +94,8 @@ not a multiple of 4 characters in length are undefined.

    The only difference between this function and fl_frame2() is the order of the line segments. +

    See also: fl_frame boxtype. +

    void fl_frame2(const char *s, int x, int y, int w, int h);

    The fl_frame2() function draws a series of line @@ -122,11 +126,11 @@ void fl_push_clip(int x, int y, int w, int h) region onto the stack. The fl_clip() name is deprecated and will be removed from future releases. -

    void fl_push_no_clip()

    +

    void fl_push_no_clip()

    Pushes an empty clip region on the stack so nothing will be clipped. -

    void fl_pop_clip()

    +

    void fl_pop_clip()

    Restore the previous clip region. @@ -143,7 +147,7 @@ will be removed from future releases. -

    int fl_not_clipped(int x, int y, int w, int h)

    +

    int fl_not_clipped(int x, int y, int w, int h)

    Returns non-zero if any of the rectangle intersects the current clip region. If this returns 0 you don't have to draw the object. @@ -159,8 +163,8 @@ region. If this returns 0 you don't have to draw the object. -

    int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, -int &H)

    +

    int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, +int &H)

    Intersect the rectangle x,y,w,h with the current clip region and returns the bounding box of the result in @@ -169,6 +173,13 @@ different than the original. This can be used to limit the necessary drawing to a rectangle. W and H are set to zero if the rectangle is completely outside the region. +

    void fl_clip_region(Fl_Region r) +
    Fl_Region fl_clip_region()

    + +

    Replace the top of the clip stack with a clipping region of any shape. +Fl_Region is an operating system specific type. The second form returns +the current clipping region. +

    Colors

    FLTK manages colors as 32-bit unsigned integers. Values from @@ -378,6 +389,14 @@ function described later in this chapter.

    extend outside the line drawn by fl_arc; to avoid this use w - 1 and h - 1.

    +

    void fl_scroll(int X, int Y, int W, int H, int dx, int dy, +void (*draw_area)(void*, int,int,int,int), void* data)

    + +

    Scroll a rectangle and draw the newly exposed portions. The contents +of the rectangular area is first shifted by dx and +dy pixels. The callback is then called for every newly +exposed rectangular area, +

    Drawing Complex Shapes

    The complex drawing functions let you draw arbitrary shapes @@ -407,6 +426,22 @@ x, float y)

    Concatenate another transformation onto the current one. The rotation angle is in degrees (not radians) and is counter-clockwise. +

    double fl_transform_x(double x, double y) +
    double fl_transform_y(double x, double y) +
    double fl_transform_dx(double x, double y) +
    double fl_transform_dy(double x, double y) +
    void fl_transformed_vertex(double xf, double yf)

    + +

    Transform a coordinate or a distance trough the current transformation matrix. +After transforming a coordinate pair, it can be added to the vertex +list without any forther translations using fl_transformed_vertex. + +

    void fl_begin_points() +
    void fl_end_points()

    + +

    Start and end drawing a list of points. Points are added to +the list with fl_vertex. +

    void fl_begin_line()
    void fl_end_line()

    @@ -417,7 +452,7 @@ angle is in degrees (not radians) and is counter-clockwise.

    Start and end drawing a closed sequence of lines. -

    void fl_begin_polygon() +

    void fl_begin_polygon()
    void fl_end_polygon()

    Start and end drawing a convex filled polygon. @@ -594,8 +629,8 @@ the display. pixels and not "points". Lines should be spaced size pixels apart or more.

    -

    int fl_font() -
    int fl_size()

    +

    int fl_font() +
    int fl_size()

    Returns the face and size set by the most recent call to fl_font(a,b). This can be used to save/restore the @@ -891,5 +926,43 @@ image, and this area is left unchanged.

    Draws the image with the upper-left corner at x,y. This is the same as doing draw(x,y,img->w(),img->h(),0,0). +

    Offscreen Drawing

    + +Sometimes it can be very useful to generate a complex drawing +in memory first and copy it to the screen at a later point in +time. This technique can significantly reduce the amount of +repeated drawing. Fl_Double_Window uses offscreen rendering +to avoid flickering on systems that don't support +double-buffering natively. + +

    Fl_Offscreen fl_create_offscreen(int w, int h)

    + +

    Create an RGB offscreen buffer with w*h pixels. + +

    Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h)

    + +

    Create an RGBA offscreen buffer. Alpha blending is not available +on all platforms. + +

    void fl_delete_offscreen(Fl_Offscreen)

    + +

    Delete a previously created offscreen buffer. All drawings are lost. + +

    void fl_begin_offscreen(Fl_Offscreen)

    + +

    Send all subsequent drawing commands to this offscreen buffer. +FLTK can draw into a buffer at any time. There is no need to wait for +an Fl_Widget::draw() to occur. + +

    void fl_end_offscreen()

    + +

    Quit sending drawing commands to this offscreen buffer. + +

    void fl_copy_offscreen(int x, int y, +int w, int h, Fl_Offscreen osrc, int srcx, int srcy)

    + +

    Copy a rectangular area of the size w*h from srcx, srcy in the offscreen +buffer into the current buffer at x, y. + diff --git a/documentation/functions.html b/documentation/functions.html index 635c424f8..475ab79ed 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -9,8 +9,10 @@ A.

    Function List by Name

    - + +

    fl_inactive

    + +
    + +

    Include File

    + + + +

    Prototype

    + + + +

    Description

    + +

    Returns the inactive, dimmed version of the give color + +

    fl_input

    diff --git a/documentation/osissues.html b/documentation/osissues.html index a7ea7ed3b..83c486502 100644 --- a/documentation/osissues.html +++ b/documentation/osissues.html @@ -133,6 +133,12 @@ unsigned long fl_xpixel(uchar r, uchar g, uchar b) index or RGB color. This is the X pixel that fl_color() would use. +

    int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b)

    + +

    Convert a name into the red, green, and blue values of a color +by parsing the X11 color names. On other systems, fl_parse_color +can only convert names in hexadecimal encoding, for example #ff8083. +

    extern XFontStruct *fl_xfont

    Points to the font selected by the most recent NULL if not found. This function uses a cache so it is slightly faster than iterating through the windows yourself. -

    Drawing Things Using the WIN32 GDIi

    +

    Drawing Things Using the WIN32 GDI

    When the virtual function Fl_Widget::draw() is @@ -640,6 +646,25 @@ window handle, or NULL if not found. FLTK windows that are children of top-level windows share the WindowRef of the top-level window. +

    Apple "Quit" Event

    + +

    When the user press Cmd-Q or requests a termination of the +application, OS X will send a "Quit" Apple Event. FLTK handles +this event by sending an FL_CLOSE event to all open +windows. If all windows close, the application will terminate. + +

    Apple "Open" Event

    + +Whenever the user drops a file onto an application icon, OS X +generates an Apple Event of the type "Open". You can have FLTK +notify you of an Open event by setting the fl_open_callback. + +

    void fl_open_callback(void (*cb)(const char *))

    + +cb will be called with a single iUnix-style file name and path. +If multiple files were dropped, fl_open_callback will be called +multiple times. +

    Drawing Things Using QuickDraw

    When the virtual function Fl_Widget::draw() is @@ -647,6 +672,17 @@ called, FLTK has prepared the Window and CGrafPort for drawing. Clipping and offsets are prepared to allow correct subwindow drawing. +

    Drawing Things Using Quartz

    + +

    If the FLTK library was compiled using the configuration +flag --enable-quartz, all code inside Fl_Widget::draw() +is expected to call Quartz drawing functions instead of +QuickDraw. The Quartz coordinate system is flipped to match +FLTK's coordinate system. The origin for all drawing is in the top +left corner of the enclosing Fl_Window. + +

    Fl_Double_Window

    +

    OS X double-buffers all windows automatically. On OS X, Fl_Window and Fl_Double_Window are handled internally in the same way. -- cgit v1.2.3