summaryrefslogtreecommitdiff
path: root/src/Fl_get_system_colors.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-13 22:17:46 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-13 22:17:46 +0000
commitdc355ebb5477bd3c4374658d3db2a935ae3fb935 (patch)
treed7f360c3d09a41abf9e2acbbfcc81eb563175fb9 /src/Fl_get_system_colors.cxx
parent7f0c218c1c96eebb2c0694909d237e7d3bdc0c97 (diff)
Add Fl::dnd_text_ops() methods.
Fl_Input now conditionally supports DND out via run-time option. Fl_Input now clears selection if you click inside the selection when DND is turned on. Added support for scheme, dndTextOps, and visibleFocus resources under X11. Documented all X resources supported under X11... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_get_system_colors.cxx')
-rw-r--r--src/Fl_get_system_colors.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index 8f216af88..7a4176ddd 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.7 2002/04/11 10:46:19 easysw Exp $"
+// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.8 2002/04/13 22:17:46 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -163,7 +163,7 @@ static void
getsyscolor(const char *key1, const char* key2, const char *arg, const char *defarg, void (*func)(uchar,uchar,uchar))
{
if (!arg) {
- arg = XGetDefault (fl_display, key1, key2);
+ arg = XGetDefault(fl_display, key1, key2);
if (!arg) arg = defarg;
}
XColor x;
@@ -210,7 +210,18 @@ Fl_Image *Fl::scheme_bg_ = (Fl_Image *)0;
static Fl_Pixmap tile(tile_xpm);
int Fl::scheme(const char *s) {
- if (!s) s = getenv("FLTK_SCHEME");
+ if (!s) {
+ if ((s = getenv("FLTK_SCHEME")) == NULL) {
+#if !defined(WIN32) && !defined(__APPLE__)
+ const char* key = 0;
+ if (Fl::first_window()) key = Fl::first_window()->xclass();
+ if (!key) key = "fltk";
+ fl_open_display();
+ s = XGetDefault(fl_display, key, "scheme");
+#endif // !WIN32 && !__APPLE__
+ }
+ }
+
if (s) {
if (!strcasecmp(s, "none") || !*s) s = 0;
else s = strdup(s);
@@ -305,5 +316,5 @@ int Fl::reload_scheme() {
//
-// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.7 2002/04/11 10:46:19 easysw Exp $".
+// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.8 2002/04/13 22:17:46 easysw Exp $".
//