mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 08:06:35 +08:00
added doxygen comments for undocumented features of Fl_FormsPixmap
Q. Is there a potential memory leak if Pixmap(B) called after set(b) ? git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6363 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+13
-1
@@ -33,14 +33,26 @@
|
|||||||
|
|
||||||
#include "Fl_Pixmap.H"
|
#include "Fl_Pixmap.H"
|
||||||
|
|
||||||
|
/**
|
||||||
|
\class Fl_FormsPixmap
|
||||||
|
\brief Forms pixmap drawing routines
|
||||||
|
*/
|
||||||
class FL_EXPORT Fl_FormsPixmap : public Fl_Widget {
|
class FL_EXPORT Fl_FormsPixmap : public Fl_Widget {
|
||||||
Fl_Pixmap *b;
|
Fl_Pixmap *b;
|
||||||
protected:
|
protected:
|
||||||
void draw();
|
void draw();
|
||||||
public:
|
public:
|
||||||
Fl_FormsPixmap(Fl_Boxtype, int, int, int, int, const char * = 0);
|
Fl_FormsPixmap(Fl_Boxtype t, int X, int Y, int W, int H, const char *L= 0);
|
||||||
|
|
||||||
void set(/*const*/char * const * bits);
|
void set(/*const*/char * const * bits);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set the internal pixmap pointer to an existing pixmap.
|
||||||
|
\param[in] B existing pixmap
|
||||||
|
*/
|
||||||
void Pixmap(Fl_Pixmap *B) {b = B;}
|
void Pixmap(Fl_Pixmap *B) {b = B;}
|
||||||
|
|
||||||
|
/** Get the internal pixmap pointer. */
|
||||||
Fl_Pixmap *Pixmap() const {return b;}
|
Fl_Pixmap *Pixmap() const {return b;}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+13
-2
@@ -27,15 +27,26 @@
|
|||||||
|
|
||||||
#include <FL/forms.H>
|
#include <FL/forms.H>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Creates a new Fl_FormsPixmap widet using the given box type, position,
|
||||||
|
size and label string.
|
||||||
|
\param[in] t box type
|
||||||
|
\param[in] X, Y, W, H position and size
|
||||||
|
\param[in] L widget label, default is no label
|
||||||
|
*/
|
||||||
Fl_FormsPixmap::Fl_FormsPixmap(
|
Fl_FormsPixmap::Fl_FormsPixmap(
|
||||||
Fl_Boxtype t, int X, int Y, int W, int H, const char* l)
|
Fl_Boxtype t, int X, int Y, int W, int H, const char* L)
|
||||||
: Fl_Widget(X, Y, W, H, l) {
|
: Fl_Widget(X, Y, W, H, L) {
|
||||||
box(t);
|
box(t);
|
||||||
b = 0;
|
b = 0;
|
||||||
color(FL_BLACK);
|
color(FL_BLACK);
|
||||||
align(FL_ALIGN_BOTTOM);
|
align(FL_ALIGN_BOTTOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set/create the internal pixmap using raw data.
|
||||||
|
\param[in] bits raw data
|
||||||
|
*/
|
||||||
void Fl_FormsPixmap::set(char*const* bits) {
|
void Fl_FormsPixmap::set(char*const* bits) {
|
||||||
delete b;
|
delete b;
|
||||||
b = new Fl_Pixmap(bits);
|
b = new Fl_Pixmap(bits);
|
||||||
|
|||||||
Reference in New Issue
Block a user