summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-27 18:34:11 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-27 18:34:11 +0000
commita0021b31ef2c5d15d2b4f6a5fa16adb7d9f7fef6 (patch)
tree3964a8a868d1c679aa9e1e5bd74616da87c2a448
parentc9013cf89247cde551c21b43d108f12a2aa8022a (diff)
Add unlock icon for public stuff.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--fluid/Fl_Type.cxx15
-rw-r--r--fluid/Fl_Type.h6
-rw-r--r--fluid/makedepend2
-rw-r--r--fluid/unlock.xpm29
4 files changed, 44 insertions, 8 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx
index 0efebee2d..fccc699d9 100644
--- a/fluid/Fl_Type.cxx
+++ b/fluid/Fl_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Type.cxx,v 1.6.2.6.2.5 2002/04/27 18:08:45 easysw Exp $"
+// "$Id: Fl_Type.cxx,v 1.6.2.6.2.6 2002/04/27 18:34:11 easysw Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
@@ -47,8 +47,10 @@
#include <FL/Fl_Pixmap.H>
#include "lock.xpm"
+#include "unlock.xpm"
static Fl_Pixmap lock_pixmap(lock_xpm);
+static Fl_Pixmap unlock_pixmap(unlock_xpm);
////////////////////////////////////////////////////////////////
@@ -137,9 +139,8 @@ void Widget_Browser::item_draw(void *v, int x, int y, int, int) const {
x += 3 + 16 + l->level * 10;
if (l->new_selected) fl_color(fl_contrast(FL_BLACK,FL_SELECTION_COLOR));
else fl_color(FL_BLACK);
- if (!l->is_public()) {
- lock_pixmap.draw(x - 16, y);
- }
+ if (l->is_public() == 0) unlock_pixmap.draw(x - 16, y);
+ else if (l->is_public() > 0) lock_pixmap.draw(x - 16, y);
if (l->is_parent()) {
if (!l->next || l->next->level <= l->level) {
if (l->open_!=(l==pushedtitle)) {
@@ -515,6 +516,10 @@ int Fl_Type::is_decl_block() const {return 0;}
int Fl_Type::is_class() const {return 0;}
int Fl_Type::is_public() const {return 1;}
+int Fl_Code_Type::is_public()const { return -1; }
+int Fl_CodeBlock_Type::is_public()const { return -1; }
+
+
////////////////////////////////////////////////////////////////
Fl_Type *in_this_only; // set if menu popped-up in window
@@ -677,5 +682,5 @@ void Fl_Type::read_property(const char *c) {
int Fl_Type::read_fdesign(const char*, const char*) {return 0;}
//
-// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.5 2002/04/27 18:08:45 easysw Exp $".
+// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.6 2002/04/27 18:34:11 easysw Exp $".
//
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
index 150eb79a6..141b8fcad 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/Fl_Type.h
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Type.h,v 1.5.2.11.2.4 2002/04/26 11:51:52 easysw Exp $"
+// "$Id: Fl_Type.h,v 1.5.2.11.2.5 2002/04/27 18:34:11 easysw Exp $"
//
// Widget type header file for the Fast Light Tool Kit (FLTK).
//
@@ -158,6 +158,7 @@ public:
void open();
virtual const char *type_name() {return "code";}
int is_code_block() const {return 0;}
+ virtual int is_public() const;
};
class Fl_CodeBlock_Type : public Fl_Type {
@@ -170,6 +171,7 @@ public:
virtual const char *type_name() {return "codeblock";}
int is_code_block() const {return 1;}
int is_parent() const {return 1;}
+ virtual int is_public() const;
void write_properties();
void read_property(const char *);
};
@@ -565,5 +567,5 @@ int storestring(const char *n, const char * & p, int nostrip=0);
extern int include_H_from_C;
//
-// End of "$Id: Fl_Type.h,v 1.5.2.11.2.4 2002/04/26 11:51:52 easysw Exp $".
+// End of "$Id: Fl_Type.h,v 1.5.2.11.2.5 2002/04/27 18:34:11 easysw Exp $".
//
diff --git a/fluid/makedepend b/fluid/makedepend
index 1969a0c19..a15987704 100644
--- a/fluid/makedepend
+++ b/fluid/makedepend
@@ -57,7 +57,7 @@ Fl_Type.o: Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H ../FL/x.H
Fl_Type.o: ../FL/Fl_Window.H ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
Fl_Type.o: ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
Fl_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H
-Fl_Type.o: ../FL/Fl_Pixmap.H lock.xpm
+Fl_Type.o: ../FL/Fl_Pixmap.H lock.xpm unlock.xpm
Fl_Window_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
Fl_Window_Type.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
Fl_Window_Type.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/fl_message.H
diff --git a/fluid/unlock.xpm b/fluid/unlock.xpm
new file mode 100644
index 000000000..dd461589f
--- /dev/null
+++ b/fluid/unlock.xpm
@@ -0,0 +1,29 @@
+/* XPM */
+static char *unlock_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"16 16 6 1",
+/* colors */
+"` c #000000",
+"a c #00FF00",
+"b c #40FF40",
+"c c none",
+"d c #80FF80",
+"e c #008000",
+/* pixels */
+"cccccccccccccccc",
+"cccccccccccccccc",
+"cccccccccccccccc",
+"ccccccccc````ccc",
+"cccccccc`daaa`cc",
+"ccccccc`da``bd`c",
+"ccccccc`a`cc`d`c",
+"ccccccc`a`cc`d`c",
+"c``````````c```c",
+"c`dddaaaae`ccccc",
+"c`daa`aaae`ccccc",
+"c`da`edaae`ccccc",
+"c`da`edaae`ccccc",
+"c`da`ddaee`ccccc",
+"c``````````ccccc",
+"cccccccccccccccc"
+};