Author: matt
Date: 2011-08-15 12:38:45 -0700 (Mon, 15 Aug 2011)
New Revision: 8968
Log:
Avoiding intptr_t because it does not compile on VC2008
Modified:
branches/branch-3.0/fluid/workspace_panel.cxx
branches/branch-3.0/fluid/workspace_panel.fl
branches/branch-3.0/fluid/workspace_panel.h
Modified: branches/branch-3.0/fluid/workspace_panel.cxx
===================================================================
--- branches/branch-3.0/fluid/workspace_panel.cxx 2011-08-15 14:29:11 UTC
(rev 8967)
+++ branches/branch-3.0/fluid/workspace_panel.cxx 2011-08-15 19:38:45 UTC
(rev 8968)
@@ -29,7 +29,7 @@
void Fl_Environment_Choice::cb_pMenuAll_i(fltk3::Menu_*, void* v) {
// this is what we want to set or clear, pEnv is what we currently have
-unsigned int e = (intptr_t)v;
+unsigned int e = (int)(long)v;
// find a good logic for settting, clearing, and partial values
if ( (pEnv&e)==e ) {
// if all bits in the menu are set, toggle the bits off
@@ -113,7 +113,7 @@
fltk3::MenuItem *mi = (fltk3::MenuItem*)pEnvMenu->menu();
int level = 0;
while (mi->label()) {
- unsigned int me = (intptr_t)mi->user_data();
+ unsigned int me = (int)(long)mi->user_data();
if (me) {
fltk3::MultiLabel *ml = (fltk3::MultiLabel*)mi->label();
if ( (me&e)==0 ) {
Modified: branches/branch-3.0/fluid/workspace_panel.fl
===================================================================
--- branches/branch-3.0/fluid/workspace_panel.fl 2011-08-15 14:29:11 UTC
(rev 8967)
+++ branches/branch-3.0/fluid/workspace_panel.fl 2011-08-15 19:38:45 UTC
(rev 8968)
@@ -32,9 +32,6 @@
decl {\#include "Fl_Type.h"} {public global
}
-decl {\#include <stdint.h>} {public global
-}
-
decl {\#include <fltk3/Pixmap.h>} {public global
}
@@ -57,14 +54,14 @@
decl {unsigned int pEnv;} {protected local
}
{fltk3::MenuButton} pEnvMenu {
- label {- unknown -} open selected
+ label {- unknown -} open
xywh {0 0 200 26} labelsize 9 align 192
} {
MenuItem pMenuAll {
label {All Environments}
user_data FL_ENV_ALL
callback {// this is what we want to set or clear, pEnv is what we
currently have
-unsigned int e = (intptr_t)v;
+unsigned int e = (int)(long)v;
// find a good logic for settting, clearing, and partial values
if ( (pEnv&e)==e ) {
// if all bits in the menu are set, toggle the bits off
@@ -148,7 +145,7 @@
fltk3::MenuItem *mi = (fltk3::MenuItem*)pEnvMenu->menu();
int level = 0;
while (mi->label()) {
- unsigned int me = (intptr_t)mi->user_data();
+ unsigned int me = (int)(long)mi->user_data();
if (me) {
fltk3::MultiLabel *ml = new fltk3::MultiLabel;
ml->labela = (char*)&menu_none_pixmap;
@@ -163,7 +160,8 @@
level--;
mi++;
}
-}} {}
+}} {selected
+ }
Function {update_all()} {open protected return_type void
} {
code {// now update all menus
@@ -171,7 +169,7 @@
fltk3::MenuItem *mi = (fltk3::MenuItem*)pEnvMenu->menu();
int level = 0;
while (mi->label()) {
- unsigned int me = (intptr_t)mi->user_data();
+ unsigned int me = (int)(long)mi->user_data();
if (me) {
fltk3::MultiLabel *ml = (fltk3::MultiLabel*)mi->label();
if ( (me&e)==0 ) {
Modified: branches/branch-3.0/fluid/workspace_panel.h
===================================================================
--- branches/branch-3.0/fluid/workspace_panel.h 2011-08-15 14:29:11 UTC (rev
8967)
+++ branches/branch-3.0/fluid/workspace_panel.h 2011-08-15 19:38:45 UTC (rev
8968)
@@ -29,7 +29,6 @@
#define workspace_panel_h
#include <fltk3/run.h>
#include "Fl_Type.h"
-#include <stdint.h>
#include <fltk3/Pixmap.h>
#include <fltk3/MultiLabel.h>
extern fltk3::Pixmap menu_none_pixmap;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit