Added gl_font calls to Cube demo for gl_font implementation on MacOS (later).
Renamed variable 'todo' in preferences.fl to 'tasks' to make global search for Todo items easier. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2319 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
690f5c5d07
commit
2967d781d7
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.5 2002/04/11 11:52:43 easysw Exp $"
|
||||
// "$Id: fl_shortcut.cxx,v 1.4.2.9.2.6 2002/06/26 02:01:33 matthiaswm Exp $"
|
||||
//
|
||||
// Shortcut support routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -116,7 +116,7 @@ const char * fl_shortcut_label(int shortcut) {
|
||||
char *p = buf;
|
||||
if (!shortcut) {*p = 0; return buf;}
|
||||
#ifdef __APPLE__
|
||||
// \todo Mac : we might want to change the symbols for Mac users
|
||||
// \todo Mac : we might want to change the symbols for Mac users - consider drawing Apple Symbols... .
|
||||
if (shortcut & FL_SHIFT) {strcpy(p,"shift+"); p += 6;} //: Mac hollow up arrow
|
||||
if (shortcut & FL_META) {strcpy(p,"ctrl+"); p += 5;} //: Mac 'cotrol'
|
||||
if (shortcut & FL_ALT) {strcpy(p,"option+"); p += 7;} //: Mac 'Option' or fancy switch symbol
|
||||
@ -200,5 +200,5 @@ int Fl_Widget::test_shortcut() {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.5 2002/04/11 11:52:43 easysw Exp $".
|
||||
// End of "$Id: fl_shortcut.cxx,v 1.4.2.9.2.6 2002/06/26 02:01:33 matthiaswm Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: cube.cxx,v 1.4.2.5.2.1 2002/01/01 15:11:32 easysw Exp $"
|
||||
// "$Id: cube.cxx,v 1.4.2.5.2.2 2002/06/26 02:01:33 matthiaswm Exp $"
|
||||
//
|
||||
// Another forms test program for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -104,6 +104,7 @@ void cube_box::draw() {
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glFrustum(-1,1,-1,1,2,10000);
|
||||
glTranslatef(0,0,-10);
|
||||
gl_font(FL_HELVETICA_BOLD, 16 );
|
||||
}
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glPushMatrix();
|
||||
@ -113,7 +114,11 @@ void cube_box::draw() {
|
||||
glTranslatef(-1.0, 1.2f, -1.5);
|
||||
glScalef(float(size),float(size),float(size));
|
||||
drawcube(wire);
|
||||
glPopMatrix();
|
||||
glPopMatrix();
|
||||
gl_color(FL_GRAY);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
gl_draw(wire ? "Cube: wire" : "Cube: flat", -4.5f, -4.5f );
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -179,5 +184,5 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: cube.cxx,v 1.4.2.5.2.1 2002/01/01 15:11:32 easysw Exp $".
|
||||
// End of "$Id: cube.cxx,v 1.4.2.5.2.2 2002/06/26 02:01:33 matthiaswm Exp $".
|
||||
//
|
||||
|
@ -210,11 +210,11 @@ Fl_Preferences app( Fl_Preferences::USER, "fltk.org", "test/preferences" );
|
||||
if ( side == 1 ) wLeft->value( 1 );
|
||||
if ( side == 2 ) wRight->value( 1 );
|
||||
|
||||
int todo;
|
||||
bed.get( "todoFlags", todo, 0x05 );
|
||||
if ( todo & 0x01 ) wShower->value( 1 );
|
||||
if ( todo & 0x02 ) wShave->value( 1 );
|
||||
if ( todo & 0x04 ) wBrush->value( 1 );
|
||||
int tasks;
|
||||
bed.get( "taskFlags", tasks, 0x05 );
|
||||
if ( tasks & 0x01 ) wShower->value( 1 );
|
||||
if ( tasks & 0x02 ) wShave->value( 1 );
|
||||
if ( tasks & 0x04 ) wBrush->value( 1 );
|
||||
|
||||
Fl_Preferences eat( app, "Breakfast" );
|
||||
|
||||
@ -276,11 +276,11 @@ Function {writePrefs()} {open return_type void
|
||||
if ( wRight->value() ) side = 2;
|
||||
bed.set( "side", side );
|
||||
|
||||
int todo = 0;
|
||||
if ( wShower->value() ) todo |= 0x01;
|
||||
if ( wShave->value() ) todo |= 0x02;
|
||||
if ( wBrush->value() ) todo |= 0x04;
|
||||
bed.set( "todoFlags", todo );
|
||||
int tasks = 0;
|
||||
if ( wShower->value() ) tasks |= 0x01;
|
||||
if ( wShave->value() ) tasks |= 0x02;
|
||||
if ( wBrush->value() ) tasks |= 0x04;
|
||||
bed.set( "taskFlags", tasks );
|
||||
|
||||
Fl_Preferences eat( app, "Breakfast" );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user