mirror of https://github.com/fltk/fltk
fix a typo and indenting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
8809c5d65d
commit
8ed93f0065
|
@ -152,7 +152,7 @@ protected:
|
|||
See activate(), output(), visible(), changed(), set_visible_focus()
|
||||
*/
|
||||
enum {
|
||||
INACTIVE = 1<<0, ///< the widget can't receive focus, and is disabled but potentially visible
|
||||
INACTIVE = 1<<0, ///< the widget can't receive focus, and is disabled but potentially visible
|
||||
INVISIBLE = 1<<1, ///< the widget is not drawn, but can receive a few special events
|
||||
OUTPUT = 1<<2, ///< for output only
|
||||
NOBORDER = 1<<3, ///< don't draw a decoration (Fl_Window)
|
||||
|
@ -693,12 +693,11 @@ public:
|
|||
unsigned int is_fullscreen() const {return (flags_ & FULLSCREEN);}
|
||||
|
||||
/** Returns whether the widget is active.
|
||||
\retval 0 if the widget is inacti
|
||||
\retval 0 if the widget is inactive
|
||||
\see active_r(), activate(), deactivate()
|
||||
*/
|
||||
unsigned int active() const {return !(flags_&INACTIVE);}
|
||||
|
||||
|
||||
/** Returns whether the widget and all of its parents are active.
|
||||
\retval 0 if this or any of the parent widgets are inactive
|
||||
\see active(), activate(), deactivate()
|
||||
|
|
|
@ -951,16 +951,16 @@ Fl_File_Chooser::fileNameCB()
|
|||
} else if (max_match > min_match && first_line) {
|
||||
// Add the matching portion...
|
||||
fileName->replace(
|
||||
(int) (filename - pathname),
|
||||
(int) (filename - pathname + min_match),
|
||||
matchname);
|
||||
(int) (filename - pathname),
|
||||
(int) (filename - pathname + min_match),
|
||||
matchname);
|
||||
|
||||
// Highlight it with the cursor at the end of the selection so
|
||||
// s/he can press the right arrow to accept the selection
|
||||
// (Tab and End also do this for both cases.)
|
||||
fileName->position(
|
||||
(int) (filename - pathname + max_match),
|
||||
(int) (filename - pathname + min_match));
|
||||
(int) (filename - pathname + max_match),
|
||||
(int) (filename - pathname + min_match));
|
||||
} else if (max_match == 0) {
|
||||
fileList->deselect(0);
|
||||
fileList->redraw();
|
||||
|
|
|
@ -461,7 +461,7 @@ int Fl_Input_::line_end(int i) const {
|
|||
for (const char* p=value()+j; ;) {
|
||||
char buf[MAXBUF];
|
||||
p = expand(p, buf);
|
||||
int k = (int) (p-value());
|
||||
int k = (int) (p-value());
|
||||
if (k >= i) return k;
|
||||
p++;
|
||||
}
|
||||
|
|
|
@ -303,7 +303,7 @@ void fl_draw(
|
|||
callthis(buf,buflen,xpos,ypos-desc);
|
||||
|
||||
if (underline_at && underline_at >= buf && underline_at < (buf + buflen))
|
||||
callthis("_",1,xpos+int(fl_width(buf,(int) (underline_at-buf))),ypos-desc);
|
||||
callthis("_",1,xpos+int(fl_width(buf,(int) (underline_at-buf))),ypos-desc);
|
||||
|
||||
if (!*e || (*e == '@' && e[1] != '@')) break;
|
||||
p = e;
|
||||
|
|
|
@ -145,11 +145,11 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
|
|||
|
||||
|
||||
static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
|
||||
uchar *g = fl_gray_ramp();
|
||||
int i, j;
|
||||
uchar *g = fl_gray_ramp();
|
||||
int i, j;
|
||||
int clen = (int) strlen(c) - 1;
|
||||
int chalf = clen / 2;
|
||||
int cstep = 1;
|
||||
int cstep = 1;
|
||||
|
||||
if (h < (w * 2)) {
|
||||
// Horizontal shading...
|
||||
|
@ -217,8 +217,8 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
|
|||
}
|
||||
|
||||
static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc) {
|
||||
uchar *g = fl_gray_ramp();
|
||||
int i;
|
||||
uchar *g = fl_gray_ramp();
|
||||
int i;
|
||||
int clen = (int) (strlen(c) - 1);
|
||||
int chalf = clen / 2;
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ enumcbw(CONST LOGFONTW *lpelf,
|
|||
dstlen = fl_utf8fromwc(n, dstlen, (xchar*)lpelf->lfFaceName, (unsigned) l); // convert the string
|
||||
n[dstlen] = 0;
|
||||
for (int i=0; i<FL_FREE_FONT; i++) // skip if one of our built-in fonts
|
||||
if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;}
|
||||
if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;}
|
||||
char buffer[LF_FACESIZE + 1];
|
||||
strcpy(buffer+1, n);
|
||||
buffer[0] = ' '; Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
|
||||
|
@ -86,7 +86,7 @@ Fl_Font Fl::set_fonts(const char* xstarname) {
|
|||
if (fl_free_font == FL_FREE_FONT) {// if not already been called
|
||||
if (!fl_gc) fl_GetDC(0);
|
||||
|
||||
EnumFontFamiliesW(fl_gc, NULL, (FONTENUMPROCW)enumcbw, xstarname != 0);
|
||||
EnumFontFamiliesW(fl_gc, NULL, (FONTENUMPROCW)enumcbw, xstarname != 0);
|
||||
|
||||
}
|
||||
return (Fl_Font)fl_free_font;
|
||||
|
@ -145,14 +145,14 @@ Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
|
|||
// int l = fl_utf_nb_char((unsigned char*)s->name+1, strlen(s->name+1));
|
||||
// unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short));
|
||||
// fl_utf2unicode((unsigned char*)s->name+1, l, (xchar*)b);
|
||||
const char *nm = (const char*)s->name+1;
|
||||
size_t len = strlen(s->name+1);
|
||||
unsigned l = fl_utf8toUtf16(nm, (unsigned) len, NULL, 0); // Pass NULL to query length required
|
||||
unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short));
|
||||
l = fl_utf8toUtf16(nm, (unsigned) len, b, (l+1)); // Now do the conversion
|
||||
b[l] = 0;
|
||||
EnumFontFamiliesW(fl_gc, (WCHAR*)b, (FONTENUMPROCW)EnumSizeCbW, 0);
|
||||
free(b);
|
||||
const char *nm = (const char*)s->name+1;
|
||||
size_t len = strlen(s->name+1);
|
||||
unsigned l = fl_utf8toUtf16(nm, (unsigned) len, NULL, 0); // Pass NULL to query length required
|
||||
unsigned short *b = (unsigned short*) malloc((l + 1) * sizeof(short));
|
||||
l = fl_utf8toUtf16(nm, (unsigned) len, b, (l+1)); // Now do the conversion
|
||||
b[l] = 0;
|
||||
EnumFontFamiliesW(fl_gc, (WCHAR*)b, (FONTENUMPROCW)EnumSizeCbW, 0);
|
||||
free(b);
|
||||
|
||||
sizep = sizes;
|
||||
return nbSize;
|
||||
|
|
Loading…
Reference in New Issue