Added missing Fl_Window::copy_label() method.

Cleaned up screen_xywh() conditional stuff.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4251 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2005-04-09 13:51:32 +00:00
parent 147b403013
commit 25447eeb04
4 changed files with 19 additions and 5 deletions
+1
View File
@@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR - Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745) #744, STR #745)
- Added missing Fl_Window::copy_label() method.
- Fixed wrong tooltip in fluid (STR #784) - Fixed wrong tooltip in fluid (STR #784)
- Added zlib path to fluid (STR #783) - Added zlib path to fluid (STR #783)
- Menus and other pop-up windows now obey screen - Menus and other pop-up windows now obey screen
+1
View File
@@ -95,6 +95,7 @@ public:
void label(const char*); void label(const char*);
void iconlabel(const char*); void iconlabel(const char*);
void label(const char* label, const char* iconlabel); void label(const char* label, const char* iconlabel);
void copy_label(const char* a);
const char* xclass() const {return xclass_;} const char* xclass() const {return xclass_;}
void xclass(const char* c) {xclass_ = c;} void xclass(const char* c) {xclass_ = c;}
const void* icon() const {return icon_;} const void* icon() const {return icon_;}
+13
View File
@@ -30,6 +30,8 @@
#include <FL/Fl.H> #include <FL/Fl.H>
#include <FL/Fl_Window.H> #include <FL/Fl_Window.H>
#include <stdlib.h>
#include "flstring.h"
void Fl_Window::_Fl_Window() { void Fl_Window::_Fl_Window() {
type(FL_WINDOW); type(FL_WINDOW);
@@ -107,6 +109,17 @@ void Fl_Window::draw() {
void Fl_Window::label(const char *name) {label(name, iconlabel());} void Fl_Window::label(const char *name) {label(name, iconlabel());}
void Fl_Window::copy_label(const char *a) {
if (flags() & COPIED_LABEL) {
free((void *)label());
clear_flag(COPIED_LABEL);
}
if (a) a = strdup(a);
label(a, iconlabel());
set_flag(COPIED_LABEL);
}
void Fl_Window::iconlabel(const char *iname) { void Fl_Window::iconlabel(const char *iname) {
uchar saveflags = flags(); uchar saveflags = flags();
label(label(), iname); label(label(), iname);
+4 -5
View File
@@ -35,11 +35,10 @@
static int num_screens = 0; static int num_screens = 0;
#ifdef WIN32 #ifdef WIN32
# if !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500)
#if !defined(HMONITOR_DECLARED) && (_WIN32_WINNT < 0x0500) # define COMPILE_MULTIMON_STUBS
#define COMPILE_MULTIMON_STUBS # include <multimon.h>
#include <multimon.h> # endif // !HMONITOR_DECLARED && _WIN32_WINNT < 0x0500
#endif
static RECT screens[16]; static RECT screens[16];