fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fluid_Image.h
Go to the documentation of this file.
1 //
2 // "$Id$"
3 //
4 // Image header file for the Fast Light Tool Kit (FLTK).
5 //
6 // This class stores the image labels for widgets in fluid. This is
7 // not a class in FLTK itself, and will produce different types of
8 // code depending on what the image type is.
9 //
10 // Copyright 1998-2010 by Bill Spitzak and others.
11 //
12 // This library is free software. Distribution and use rights are outlined in
13 // the file "COPYING" which should have been included with this file. If this
14 // file is missing or damaged, see the license at:
15 //
16 // http://www.fltk.org/COPYING.php
17 //
18 // Please report all bugs and problems on the following page:
19 //
20 // http://www.fltk.org/str.php
21 //
22 
23 #ifndef FLUID_IMAGE_H
24 # define FLUID_IMAGE_H
25 
26 # include <FL/Fl_Shared_Image.H>
27 
28 
29 class Fluid_Image {
30  const char *name_;
31  int refcount;
33  const char *function_name_;
34 protected:
35  Fluid_Image(const char *name); // no public constructor
36  ~Fluid_Image(); // no public destructor
37 public:
38  int written;
39  static Fluid_Image* find(const char *);
40  void decrement(); // reference counting & automatic free
41  void increment();
42  void image(Fl_Widget *); // set the image of this widget
43  void deimage(Fl_Widget *); // set the deimage of this widget
44  void write_static();
45  void write_initializer(const char *type_name, const char *format, ...);
46  void write_code(const char *var, int inactive = 0);
47  const char *name() const {return name_;}
48 };
49 
50 // pop up file chooser and return a legal image selected by user,
51 // or zero for any errors:
52 Fluid_Image *ui_find_image(const char *);
53 extern const char *ui_find_image_name;
54 
55 #endif
56 
57 //
58 // End of "$Id$".
59 //
Fluid_Image::Fluid_Image
Fluid_Image(const char *name)
Definition: Fluid_Image.cxx:208
Fluid_Image::write_static
void write_static()
Definition: Fluid_Image.cxx:46
Fluid_Image::~Fluid_Image
~Fluid_Image()
Definition: Fluid_Image.cxx:226
Fluid_Image::write_code
void write_code(const char *var, int inactive=0)
Definition: Fluid_Image.cxx:147
Fluid_Image::img
Fl_Shared_Image * img
Definition: Fluid_Image.h:32
Fluid_Image::name_
const char * name_
Definition: Fluid_Image.h:30
Fluid_Image::written
int written
Definition: Fluid_Image.h:38
Fluid_Image::refcount
int refcount
Definition: Fluid_Image.h:31
Fluid_Image::function_name_
const char * function_name_
Definition: Fluid_Image.h:33
ui_find_image
Fluid_Image * ui_find_image(const char *)
Definition: Fluid_Image.cxx:242
ui_find_image_name
const char * ui_find_image_name
Definition: Fluid_Image.cxx:241
Fl_Widget
Definition: Fl_Widget.H:101
Fluid_Image::increment
void increment()
Definition: Fluid_Image.cxx:216
Fl_Shared_Image.H
Fluid_Image::decrement
void decrement()
Definition: Fluid_Image.cxx:220
Fluid_Image::find
static Fluid_Image * find(const char *)
Definition: Fluid_Image.cxx:160
Fluid_Image::write_initializer
void write_initializer(const char *type_name, const char *format,...)
Definition: Fluid_Image.cxx:133
Fluid_Image::image
void image(Fl_Widget *)
Definition: Fluid_Image.cxx:33
Fl_Shared_Image
Definition: Fl_Shared_Image.H:50
Fluid_Image
Definition: Fluid_Image.h:29
Fluid_Image::name
const char * name() const
Definition: Fluid_Image.h:47
Fluid_Image::deimage
void deimage(Fl_Widget *)
Definition: Fluid_Image.cxx:37