diff options
| author | Fabien Costantini <fabien@onepost.net> | 2012-04-05 05:12:30 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2012-04-05 05:12:30 +0000 |
| commit | 8809c5d65dd20895dcae90e9d2af05fd271f2e9e (patch) | |
| tree | d53cbf6d921ae68bda31b6c5d522dc8c87ee9bd1 /src/Fl_Menu.cxx | |
| parent | 37ea8ba9e635e9655417714bd49ab7bb2b36beb5 (diff) | |
Fixed build error in msvs because Fl ref to FULLSCREEN enum was not accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Menu.cxx')
| -rw-r--r-- | src/Fl_Menu.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 73f03f161..be8bbba6c 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -35,7 +35,7 @@ int Fl_Menu_Item::size() const { int nest = 0; for (;;) { if (!m->text) { - if (!nest) return (m-this+1); + if (!nest) return (int) (m-this+1); nest--; } else if (m->flags & FL_SUBMENU) { nest++; @@ -331,9 +331,9 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, // s is a pointerto the utf8 string for the entire shortcut // k points only to the key part (minus the modifier keys) const char *k, *s = fl_shortcut_label(m->shortcut_, &k); - if (fl_utf_nb_char((const unsigned char*)k, strlen(k))<=4) { + if (fl_utf_nb_char((const unsigned char*)k, (int) strlen(k))<=4) { // a regular shortcut has a right-justified modifier followed by a left-justified key - w1 = int(fl_width(s, k-s)); + w1 = int(fl_width(s, (int) (k-s))); if (w1 > hotModsw) hotModsw = w1; w1 = int(fl_width(k))+4; if (w1 > hotKeysw) hotKeysw = w1; @@ -455,7 +455,7 @@ void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int eraseit) { fl_font(f, m->labelsize_ ? m->labelsize_ : button ? button->textsize() : FL_NORMAL_SIZE); const char *k, *s = fl_shortcut_label(m->shortcut_, &k); - if (fl_utf_nb_char((const unsigned char*)k, strlen(k))<=4) { + if (fl_utf_nb_char((const unsigned char*)k, (int) strlen(k))<=4) { // righ-align the modifiers and left-align the key char buf[32]; strcpy(buf, s); buf[k-s] = 0; fl_draw(buf, xx, yy, ww-shortcutWidth, hh, FL_ALIGN_RIGHT); |
