FLTK logo

Documentation

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]
 

class Fl_Shared_Image


Class Hierarchy

Include Files

    #include <FL/Fl_Shared_Image.H>
    

Description

The Fl_Shared_Image class supports caching, loading, and drawing of image files. Most applications will also want to link against the fltk_images library and call the fl_register_images() function to support standard image formats such as BMP, GIF, JPEG, and PNG.

Methods

protected Fl_Shared_Image::Fl_Shared_Image();
protected Fl_Shared_Image::Fl_Shared_Image(const char *name, Fl_Image *img);

The constructors create a new shared image record in the image cache.

The constructors are protected and cannot be used directly from a program. Use the get() method instead.

protected Fl_Shared_Image::~Fl_Shared_Image();

The destructor free all memory and server resources that are used by the image. The destructor is protected and cannot be used directly from a program. Use the release() method instead.

static Fl_Shared_Image *find(const char *n, int W = 0, int H = 0);

static Fl_Shared_Image *get(const char *n, int W = 0, int H = 0);

static Fl_Shared_Image **images();

const char *name();

static int num_images();

int refcount();

void release();

void reload();


User Comments [ Add Comment ]

From Belgiansteve, 09:17 Dec 15, 2009 (score=3)

The add_handler function is not described on this page. Can someone please explain the purpose of this function. I noticed it in the file_chooser example. I understand it registers some type of callback function, but I'm not sure I understand how and when this callback gets called. Thanks!
Reply ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.