X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_menu.c;h=3ba5b224770aea90b7a09e08cda9b7a366ec3cc6;hb=517df5ccb5289e3159f9cb21d083e945cde97d30;hp=0d00ae085fdbb68ea6274dd12fed140c2d99d81a;hpb=1fcc6b80990394c277a4c2ddeafab948ada650cd;p=freeglut diff --git a/src/freeglut_menu.c b/src/freeglut_menu.c index 0d00ae0..3ba5b22 100644 --- a/src/freeglut_menu.c +++ b/src/freeglut_menu.c @@ -124,10 +124,10 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next ) { - if( menuEntry->SubMenu && ( menuEntry->IsActive == TRUE ) ) + if( menuEntry->SubMenu && menuEntry->IsActive ) { /* - * OK, have the sub-menu checked, too. If it returns TRUE, it + * OK, have the sub-menu checked, too. If it returns GL_TRUE, it * will mean that it caught the mouse cursor and we do not need * to regenerate the activity list, and so our parents do... */ @@ -138,9 +138,9 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) * Reactivate the submenu as the checkMenuStatus may have turned * it off if the mouse is in its parent menu entry. */ - menuEntry->SubMenu->IsActive = TRUE; - if ( return_status == TRUE ) - return TRUE; + menuEntry->SubMenu->IsActive = GL_TRUE; + if ( return_status ) + return GL_TRUE; } } @@ -153,9 +153,9 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next ) - menuEntry->IsActive = FALSE; + menuEntry->IsActive = GL_FALSE; - menu->IsActive = FALSE; + menu->IsActive = GL_FALSE; /* * Check if the mouse cursor is contained within the current menu box @@ -174,7 +174,7 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) menuEntry = fghFindMenuEntry( menu, menuID + 1 ); assert( menuEntry ); - menuEntry->IsActive = TRUE; + menuEntry->IsActive = GL_TRUE; menuEntry->Ordinal = menuID; /* @@ -187,7 +187,7 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) fgDeactivateSubMenu( menu->ActiveEntry ); menu->ActiveEntry = menuEntry; - menu->IsActive = TRUE; + menu->IsActive = GL_TRUE; /* * OKi, we have marked that entry as active, but it would be also @@ -203,7 +203,7 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) /* * Set up the initial menu position now... */ - menuEntry->SubMenu->IsActive = TRUE; + menuEntry->SubMenu->IsActive = GL_TRUE; /* * Set up the initial submenu position now: @@ -239,19 +239,19 @@ static GLboolean fghCheckMenuStatus( SFG_Window* window, SFG_Menu* menu ) /* * Activate it because its parent entry is active */ - menuEntry->SubMenu->IsActive = TRUE; + menuEntry->SubMenu->IsActive = GL_TRUE; } /* * Report back that we have caught the menu cursor */ - return TRUE; + return GL_TRUE; } /* * Looks like the menu cursor is somewhere else... */ - return FALSE; + return GL_FALSE; } /* @@ -289,7 +289,7 @@ static void fghDisplayMenuBox( SFG_Menu* menu ) glVertex2i( menu->Width - border, border); glEnd( ); - glColor4fv( menu_pen_back ) ; + glColor4fv( menu_pen_back ); glBegin( GL_QUADS ); glVertex2i( border, border); glVertex2i( menu->Width - border, border); @@ -307,7 +307,7 @@ static void fghDisplayMenuBox( SFG_Menu* menu ) /* * Has the menu been marked as active, maybe? */ - if( menuEntry->IsActive == TRUE ) + if( menuEntry->IsActive ) { /* * That's truly right, and we need to have it highlighted. @@ -362,7 +362,7 @@ static void fghDisplayMenuBox( SFG_Menu* menu ) /* * Have the label drawn, character after character: */ - glutBitmapString( FREEGLUT_MENU_FONT, menuEntry->Text); + glutBitmapString( FREEGLUT_MENU_FONT, (unsigned char *) menuEntry->Text); /* * If it's a submenu, draw a right arrow @@ -397,7 +397,7 @@ static void fghDisplayMenuBox( SFG_Menu* menu ) /* * Is that an active sub menu by any case? */ - if( menuEntry->SubMenu && ( menuEntry->IsActive == TRUE ) ) + if( menuEntry->SubMenu && menuEntry->IsActive ) { /* * Yeah, indeed. Have it redrawn now: @@ -495,7 +495,7 @@ void fgActivateMenu( SFG_Window* window, int button ) * Mark the menu as active, so that it gets displayed: */ window->ActiveMenu = menu; - menu->IsActive = TRUE; + menu->IsActive = GL_TRUE; fgState.ActiveMenus++; /* @@ -552,7 +552,7 @@ void fgExecuteMenuCallback( SFG_Menu* menu ) menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next) { - if( menuEntry->IsActive == TRUE ) + if( menuEntry->IsActive ) { if( menuEntry->SubMenu ) fgExecuteMenuCallback( menuEntry->SubMenu ); @@ -593,7 +593,7 @@ void fgDeactivateMenu( SFG_Window *window ) */ menu->Window->ActiveMenu = NULL; menu->ParentWindow->ActiveMenu = NULL; - menu->IsActive = FALSE; + menu->IsActive = GL_FALSE; fgState.ActiveMenus--; @@ -631,7 +631,7 @@ void fgDeactivateSubMenu( SFG_MenuEntry *menuEntry ) * Forget about having that menu active anymore, now: */ menuEntry->SubMenu->Window->ActiveMenu = NULL; - menuEntry->SubMenu->IsActive = FALSE; + menuEntry->SubMenu->IsActive = GL_FALSE; /* * Hide all submenu windows, and the root menu's window. @@ -675,14 +675,14 @@ void fghCalculateMenuBoxSize( void ) * Update the menu entry's width value */ menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT, - menuEntry->Text ); + (unsigned char *) menuEntry->Text ); /* * If the entry is a submenu, then it needs to be wider to * accomodate the arrow. JCJ 31 July 2003 */ if (menuEntry->SubMenu ) - menuEntry->Width += glutBitmapLength( FREEGLUT_MENU_FONT, "_" ); + menuEntry->Width += glutBitmapLength( FREEGLUT_MENU_FONT, (unsigned char *) "_" ); /* * Check if it's the biggest we've found