( window->State.Redisplay == TRUE ) &&
( window->State.Visible == TRUE ) )
{
- SFG_Window *current_window = fgStructure.Window ;
+ SFG_Window *current_window = fgStructure.Window;
window->State.Redisplay = FALSE;
INVOKE_WCB( *window, Display, ( ) );
gettimeofday( &now, NULL );
- elapsed = (now.tv_usec - fgState.Time.Value.tv_usec) / 1000;
- elapsed += (now.tv_sec - fgState.Time.Value.tv_sec) * 1000;
+ elapsed = ( now.tv_usec - fgState.Time.Value.tv_usec ) / 1000;
+ elapsed += ( now.tv_sec - fgState.Time.Value.tv_sec ) * 1000;
return elapsed;
#elif TARGET_HOST_WIN32
- return timeGetTime() - fgState.Time.Value;
+ return timeGetTime( ) - fgState.Time.Value;
#endif
}
else
va_start( ap, fmt );
- fprintf( stderr, "freeglut ");
+ fprintf( stderr, "freeglut " );
if( fgState.ProgramName )
- fprintf (stderr, "(%s): ", fgState.ProgramName);
+ fprintf( stderr, "(%s): ", fgState.ProgramName );
vfprintf( stderr, fmt, ap );
fprintf( stderr, "\n" );
va_start( ap, fmt );
- fprintf( stderr, "freeglut ");
+ fprintf( stderr, "freeglut " );
if( fgState.ProgramName )
fprintf( stderr, "(%s): ", fgState.ProgramName );
vfprintf( stderr, fmt, ap );
* an opaque wall.
*
*/
-static void fgCheckJoystickCallback( SFG_Window* w, SFG_Enumerator* e)
+static void fgCheckJoystickCallback( SFG_Window* w, SFG_Enumerator* e )
{
if( FETCH_WCB( *w, Joystick ) )
{
fgEnumWindows( fgCheckJoystickCallback, &enumerator );
return !!enumerator.data;
}
-static void fgHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e)
+static void fgHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e )
{
if( w->State.Redisplay )
{
}
fgEnumSubWindows( w, fgHavePendingRedisplaysCallback, e );
}
-static int fgHavePendingRedisplays (void)
+static int fgHavePendingRedisplays( void )
{
SFG_Enumerator enumerator;
enumerator.found = FALSE;
*/
static long fgNextTimer( void )
{
- long now = fgElapsedTime();
+ long now = fgElapsedTime( );
long ret = INT_MAX;
SFG_Timer *timer;
- for( timer = (SFG_Timer *)fgState.Timers.First;
+ for( timer = ( SFG_Timer * )fgState.Timers.First;
timer;
- timer = (SFG_Timer *)timer->Node.Next )
- ret = MIN( ret, MAX( 0, (timer->TriggerTime) - now ) );
+ timer = ( SFG_Timer * )timer->Node.Next )
+ ret = MIN( ret, MAX( 0, timer->TriggerTime - now ) );
return ret;
}
if( fgHaveJoystick( ) )
msec = MIN( msec, 10 );
- wait.tv_sec = msec / 1000;
- wait.tv_usec = (msec % 1000) * 1000;
+ wait.tv_sec = msec / 1000;
+ wait.tv_usec = ( msec % 1000 ) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait );
if( -1 == err )
- printf( "freeglut select() error: %d\n", errno );
+ fgWarning( "freeglut select() error: %d\n", errno );
#elif TARGET_HOST_WIN32
#endif
{
GETWINDOW( xclient );
- fgCloseWindow ( window ) ;
+ fgCloseWindow ( window );
fgAddToWindowDestroyList ( window, FALSE );
}
break;
window->ActiveMenu->Window->State.MouseY =
event.xmotion.y_root - window->ActiveMenu->Y;
}
- window->ActiveMenu->Window->State.Redisplay = TRUE ;
- fgSetWindow( window->ActiveMenu->ParentWindow ) ;
+ window->ActiveMenu->Window->State.Redisplay = TRUE;
+ fgSetWindow( window->ActiveMenu->ParentWindow );
break;
}
* XXX For more than 5 buttons, just check {event.xmotion.state},
* XXX rather than a host of bit-masks?
*/
- if( (event.xmotion.state & Button1Mask) ||
- (event.xmotion.state & Button2Mask) ||
- (event.xmotion.state & Button3Mask) ||
- (event.xmotion.state & Button4Mask) ||
- (event.xmotion.state & Button5Mask) )
+#define BUTTON_MASK \
+ ( Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask )
+ if( event.xmotion.state & BUTTON_MASK )
INVOKE_WCB( *window, Motion, ( event.xmotion.x,
event.xmotion.y ) );
else
int button;
if( event.type == ButtonRelease )
- pressed = FALSE ;
+ pressed = FALSE;
/*
* A mouse button has been pressed or released. Traditionally,
* No active menu, let's check whether we need to activate one.
*/
if( ( 0 <= button ) &&
- ( 2 >= button ) &&
+ ( FREEGLUT_MAX_MENUS > button ) &&
( window->Menu[ button ] ) &&
pressed )
{
* XXX Note that {button} has already been decremeted
* XXX in mapping from X button numbering to GLUT.
*/
- int wheel_number = (button - 3) / 2;
+ int wheel_number = ( button - 3 ) / 2;
int direction = -1;
if( button % 2 )
direction = 1;
* Check for the ASCII/KeySym codes associated with the event:
*/
len = XLookupString( &event.xkey, asciiCode, sizeof(asciiCode),
- &keySym, &composeStatus );
+ &keySym, &composeStatus
+ );
/*
* GLUT API tells us to have two separate callbacks...
fgSetWindow( window );
window->State.Modifiers = fgGetXModifiers( &event );
keyboard_cb( asciiCode[ 0 ],
- event.xkey.x, event.xkey.y );
+ event.xkey.x, event.xkey.y
+ );
window->State.Modifiers = 0xffffffff;
}
}
* Execute the callback (if one has been specified),
* given that the special code seems to be valid...
*/
- if( special_cb && (special != -1) )
+ if( special_cb && ( special != -1 ) )
{
fgSetWindow( window );
window->State.Modifiers = fgGetXModifiers( &event );
break; /* XXX Should disable this event */
default:
- fgWarning ("Unknown X event type: %d", event.type);
+ fgWarning( "Unknown X event type: %d", event.type );
break;
}
}
while( PeekMessage( &stMsg, NULL, 0, 0, PM_NOREMOVE ) )
{
if( GetMessage( &stMsg, NULL, 0, 0 ) == 0 )
- fgState.ExecState = GLUT_EXEC_STATE_STOP ;
+ fgState.ExecState = GLUT_EXEC_STATE_STOP;
TranslateMessage( &stMsg );
DispatchMessage( &stMsg );
void FGAPIENTRY glutMainLoop( void )
{
#if TARGET_HOST_WIN32
- SFG_Window *window = (SFG_Window *)fgStructure.Windows.First ;
+ SFG_Window *window = (SFG_Window *)fgStructure.Windows.First;
#endif
freeglut_assert_ready;
*/
while( window )
{
- if ( FETCH_WCB( *window, Visibility ) )
+ if( FETCH_WCB( *window, Visibility ) )
{
- SFG_Window *current_window = fgStructure.Window ;
+ SFG_Window *current_window = fgStructure.Window;
INVOKE_WCB( *window, Visibility, ( window->State.Visible ) );
fgSetWindow( current_window );
}
- window = (SFG_Window *)window->Node.Next ;
+ window = (SFG_Window *)window->Node.Next;
}
#endif
- fgState.ExecState = GLUT_EXEC_STATE_RUNNING ;
+ fgState.ExecState = GLUT_EXEC_STATE_RUNNING;
while( fgState.ExecState == GLUT_EXEC_STATE_RUNNING )
{
glutMainLoopEvent( );
if( fgState.IdleCallback )
fgState.IdleCallback( );
- fgSleepForEvents();
+ fgSleepForEvents( );
}
}
fgDeinitialize( );
if( execState == GLUT_ACTION_EXIT )
- exit( 0 ) ;
+ exit( 0 );
}
}
*/
void FGAPIENTRY glutLeaveMainLoop( void )
{
- fgState.ExecState = GLUT_EXEC_STATE_STOP ;
+ fgState.ExecState = GLUT_EXEC_STATE_STOP;
}
LONG lRet = 1;
if ( ( window == NULL ) && ( uMsg != WM_CREATE ) )
- return( DefWindowProc( hWnd, uMsg, wParam, lParam ) );
+ return DefWindowProc( hWnd, uMsg, wParam, lParam );
/* printf ( "Window %3d message <%04x> %12d %12d\n", window?window->ID:0,
uMsg, wParam, lParam ); */
if( fgStructure.MenuContext )
wglMakeCurrent( window->Window.Device,
- fgStructure.MenuContext->Context ) ;
+ fgStructure.MenuContext->Context
+ );
else
{
fgStructure.MenuContext =
wglCreateContext( window->Window.Device );
}
- /* window->Window.Context = wglGetCurrentContext () ; */
+ /* window->Window.Context = wglGetCurrentContext( ); */
window->Window.Context = wglCreateContext( window->Window.Device );
}
else
break;
#if 0
case WM_SETFOCUS:
- printf("WM_SETFOCUS: %p\n", window );
+ printf( "WM_SETFOCUS: %p\n", window );
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
break;
case WM_ACTIVATE:
- if (LOWORD(wParam) != WA_INACTIVE)
+ if( LOWORD( wParam ) != WA_INACTIVE )
{
/* glutSetCursor( fgStructure.Window->State.Cursor ); */
printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window,
/*
* Windows seems to need reminding to erase the cursor for NONE.
*/
+
+ /*
+ * XXX Is this #if 0 section anything that we need to worry
+ * XXX about? Can we delete it? If it will ever be used,
+ * XXX why not re-use some common code with the glutSetCursor()
+ * XXX function (or perhaps invoke glutSetCursor())?
+ */
#if 0
- if ((LOWORD(lParam) == HTCLIENT) &&
- (fgStructure.Window->State.Cursor == GLUT_CURSOR_NONE))
+ if( ( LOWORD( lParam ) == HTCLIENT ) &&
+ ( fgStructure.Window->State.Cursor == GLUT_CURSOR_NONE ) )
SetCursor( NULL );
#else
/* Set the cursor AND change it for this window class. */
-#define MAP_CURSOR(a,b) \
- case a: \
- SetCursor( LoadCursor( NULL, b ) ); \
- break;
+#define MAP_CURSOR(a,b) \
+ case a: \
+ SetCursor( LoadCursor( NULL, b ) ); \
+ break;
/* Nuke the cursor AND change it for this window class. */
-#define ZAP_CURSOR(a,b) \
- case a: \
- SetCursor( NULL ); \
- break;
+#define ZAP_CURSOR(a,b) \
+ case a: \
+ SetCursor( NULL ); \
+ break;
if( LOWORD( lParam ) == HTCLIENT )
switch( window->State.Cursor )
*/
if( fgStructure.Window == window )
{
- int used = FALSE ;
- SFG_Window *iter ;
+ int used = FALSE;
+ SFG_Window *iter;
wglMakeCurrent( NULL, NULL );
/*
window->State.MouseX = LOWORD( lParam );
window->State.MouseY = HIWORD( lParam );
+ /*
+ * XXX Either these multi-statement lines should be broken
+ * XXX in the form:
+ * XXX pressed = TRUE;
+ * XXX button = GLUT_LEFT_BUTTON;
+ * XXX break;
+ * XXX ...or we should use a macro (much as I dislike freeglut's
+ * XXX preponderance of using macros to "compress" code).
+ */
switch( uMsg )
{
case WM_LBUTTONDOWN:
return DefWindowProc( hWnd, uMsg, lParam, wParam );
/*
+ * XXX This comment is duplicated in two other spots.
+ * XXX Can we centralize it?
+ *
* Do not execute the application's mouse callback if a
* menu is hooked to this button.
* In that case an appropriate private call should be generated.
/* Window has an active menu, it absorbs any mouse click */
if( window->ActiveMenu )
{
- /* Inside the menu, invoke the callback and deactivate the menu*/
- if( fgCheckActiveMenu( window, window->ActiveMenu ) == TRUE )
+ /* Outside the menu, deactivate the menu if it's a downclick */
+ if( fgCheckActiveMenu( window, window->ActiveMenu ) != TRUE )
+ {
+ if( pressed == TRUE )
+ fgDeactivateMenu( window->ActiveMenu->ParentWindow );
+ }
+ else /* In menu, invoke the callback and deactivate the menu*/
{
/*
* Save the current window and menu and set the current
fgSetWindow( save_window );
fgStructure.Menu = save_menu;
}
- else /* Out of menu, deactivate the menu if it's a downclick */
- {
- if( pressed == TRUE )
- fgDeactivateMenu( window->ActiveMenu->ParentWindow );
- }
/*
* Let's make the window redraw as a result of the mouse
break;
}
- if ( ( window->Menu[ button ] ) && ( pressed == TRUE ) )
+ if( ( window->Menu[ button ] ) && ( pressed == TRUE ) )
{
window->State.Redisplay = TRUE;
fgSetWindow( window );
case 0x020a:
/* Should be WM_MOUSEWHEEL but my compiler doesn't recognize it */
{
+ /*
+ * XXX THIS IS SPECULATIVE -- John Fay, 10/2/03
+ * XXX Should use WHEEL_DELTA instead of 120
+ */
int wheel_number = LOWORD( wParam );
- /* THIS IS SPECULATIVE -- John Fay, 10/2/03 */
short ticks = ( short )HIWORD( wParam ) / 120;
- /* Should be WHEEL_DELTA instead of 120 */
int direction = 1;
if( ticks < 0 )
fgStructure.Window->State.Modifiers = 0xffffffff;
}
- break ;
+ break;
case WM_SYSKEYDOWN:
case WM_KEYDOWN:
{
int keypress = -1;
- POINT mouse_pos ;
+ POINT mouse_pos;
if( fgState.IgnoreKeyRepeat && (lParam & KF_REPEAT) )
break;
*/
switch ( lParam )
{
- case SC_SIZE :
- break ;
+ case SC_SIZE:
+ break;
- case SC_MOVE :
- break ;
+ case SC_MOVE:
+ break;
- case SC_MINIMIZE :
+ case SC_MINIMIZE:
/* User has clicked on the "-" to minimize the window */
/* Turn off the visibility */
- window->State.Visible = GL_FALSE ;
-
- break ;
+ window->State.Visible = GL_FALSE;
+ break;
- case SC_MAXIMIZE :
- break ;
+ case SC_MAXIMIZE:
+ break;
- case SC_NEXTWINDOW :
- break ;
+ case SC_NEXTWINDOW:
+ break;
- case SC_PREVWINDOW :
- break ;
+ case SC_PREVWINDOW:
+ break;
- case SC_CLOSE :
+ case SC_CLOSE:
/* Followed very closely by a WM_CLOSE message */
- break ;
+ break;
- case SC_VSCROLL :
- break ;
+ case SC_VSCROLL:
+ break;
- case SC_HSCROLL :
- break ;
+ case SC_HSCROLL:
+ break;
- case SC_MOUSEMENU :
- break ;
+ case SC_MOUSEMENU:
+ break;
- case SC_KEYMENU :
- break ;
+ case SC_KEYMENU:
+ break;
- case SC_ARRANGE :
- break ;
+ case SC_ARRANGE:
+ break;
- case SC_RESTORE :
- break ;
+ case SC_RESTORE:
+ break;
- case SC_TASKLIST :
- break ;
+ case SC_TASKLIST:
+ break;
- case SC_SCREENSAVE :
- break ;
+ case SC_SCREENSAVE:
+ break;
- case SC_HOTKEY :
- break ;
+ case SC_HOTKEY:
+ break;
}
}
* was a submenu then deactivate it.
*/
if( menu->ActiveEntry && ( menuEntry != menu->ActiveEntry ) )
- {
if( menu->ActiveEntry->SubMenu )
fgDeactivateSubMenu( menu->ActiveEntry );
- }
menu->ActiveEntry = menuEntry;
menu->IsActive = TRUE;
glColor4fv( menu_pen_fore );
- for( menuEntry = (SFG_MenuEntry *)menu->Entries.First, i=0;
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First, i = 0;
menuEntry;
menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next, ++i )
{
/* Try to center the text - JCJ 31 July 2003*/
glRasterPos2i(
2 * border,
- (i + 1)*FREEGLUT_MENU_HEIGHT -
- (int)( FREEGLUT_MENU_HEIGHT*0.3 - border )
+ ( i + 1 )*FREEGLUT_MENU_HEIGHT -
+ ( int )( FREEGLUT_MENU_HEIGHT*0.3 - border )
);
/*
int x_base = menu->Width - 2 - width;
int y_base = i*FREEGLUT_MENU_HEIGHT + border;
glBegin( GL_TRIANGLES );
- glVertex2i( x_base, y_base + 2 * border);
+ glVertex2i( x_base, y_base + 2*border);
glVertex2i( menu->Width - 2, y_base +
( FREEGLUT_MENU_HEIGHT + border) / 2 );
glVertex2i( x_base, y_base + FREEGLUT_MENU_HEIGHT - border );
/*
* Now we are ready to check if any of our children needs to be redrawn:
*/
- for( menuEntry = (SFG_MenuEntry *)menu->Entries.First;
+ for( menuEntry = ( SFG_MenuEntry * )menu->Entries.First;
menuEntry;
- menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
+ menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
{
/*
* Is that an active sub menu by any case?
* Private static function to set the parent window of a submenu and all
* of its submenus
*/
-static void fghSetSubmenuParentWindow ( SFG_Window *window, SFG_Menu *menu )
+static void fghSetSubmenuParentWindow( SFG_Window *window, SFG_Menu *menu )
{
SFG_MenuEntry *menuEntry;
menu->ParentWindow = window;
- for( menuEntry = (SFG_MenuEntry *)menu->Entries.First;
+ for( menuEntry = ( SFG_MenuEntry * )menu->Entries.First;
menuEntry;
- menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
- if ( menuEntry->SubMenu )
- fghSetSubmenuParentWindow ( window, menuEntry->SubMenu ) ;
+ menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
+ if( menuEntry->SubMenu )
+ fghSetSubmenuParentWindow( window, menuEntry->SubMenu );
}
SFG_Window* window = fgStructure.Window;
SFG_Menu* menu = NULL;
- /*
- * Make sure there is a current window available
- */
freeglut_assert_window;
/*
* Check if there is an active menu attached to this window...
*/
menu = window->ActiveMenu;
-
- /*
- * Did we find an active menu?
- */
freeglut_return_if_fail( menu );
- fgSetWindow ( menu->Window );
+ fgSetWindow( menu->Window );
- /*
- * Prepare the OpenGL state to do the rendering first:
- */
glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_TEXTURE_BIT | GL_LIGHTING_BIT |
GL_POLYGON_BIT );
glDisable( GL_LIGHTING );
glDisable( GL_CULL_FACE );
- /*
- * We'll use an orthogonal projection matrix to draw the menu:
- */
glMatrixMode( GL_PROJECTION );
- glPushMatrix();
- glLoadIdentity();
+ glPushMatrix( );
+ glLoadIdentity( );
glOrtho(
0, glutGet( GLUT_WINDOW_WIDTH ),
glutGet( GLUT_WINDOW_HEIGHT ), 0,
-1, 1
);
- /*
- * Model-view matix gets reset to identity:
- */
glMatrixMode( GL_MODELVIEW );
- glPushMatrix();
- glLoadIdentity();
+ glPushMatrix( );
+ glLoadIdentity( );
- /*
- * First of all, have the exact menu status check:
- */
fghCheckMenuStatus( window, menu );
-
- /*
- * The status has been updated and we're ready to have the menu drawn now:
- */
fghDisplayMenuBox( menu );
- /*
- * Restore the old OpenGL settings now
- */
glPopAttrib( );
glMatrixMode( GL_PROJECTION );
glutSwapBuffers( );
- /*
- * Restore the current window
- */
fgSetWindow ( window );
}
/*
* Set up the initial menu position now:
*/
-
menu->X = window->State.MouseX + glutGet( GLUT_WINDOW_X );
menu->Y = window->State.MouseY + glutGet( GLUT_WINDOW_Y );
menuEntry;
menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next)
{
- /*
- * Is this menu entry active?
- */
if( menuEntry->IsActive == TRUE )
{
- /*
- * If there is not a sub menu, execute the menu callback and
- * return...
- */
- if( !( menuEntry->SubMenu ) )
- {
- /*
- * ...certainly given that there is one...
- */
+ if( menuEntry->SubMenu )
+ fgExecuteMenuCallback( menuEntry->SubMenu );
+ else
if( menu->Callback )
menu->Callback( menuEntry->ID );
-
- return;
- }
-
- /*
- * Otherwise recurse into the submenu.
- */
- fgExecuteMenuCallback( menuEntry->SubMenu );
-
- /*
- * There is little sense in dwelling the search on
- */
return;
}
}
/*
* Hide all submenu windows, and the root menu's window.
*/
- for ( menuEntry = (SFG_MenuEntry *)menu->Entries.First;
+ for ( menuEntry = ( SFG_MenuEntry * )menu->Entries.First;
menuEntry;
- menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
+ menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
{
/*
* Is that an active submenu by any case?
fgDeactivateSubMenu( menuEntry );
}
- fgSetWindow ( current_window ) ;
+ fgSetWindow( current_window );
}
/*
/*
* The menu's box size depends on the menu entries:
*/
- for( menuEntry = (SFG_MenuEntry *)fgStructure.Menu->Entries.First;
+ for( menuEntry = ( SFG_MenuEntry * )fgStructure.Menu->Entries.First;
menuEntry;
- menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next)
+ menuEntry = ( SFG_MenuEntry * )menuEntry->Node.Next )
{
/*
* Update the menu entry's width value
/*
* Creates a new menu object, adding it to the freeglut structure
*/
-int FGAPIENTRY glutCreateMenu( void (* callback)( int ) )
+int FGAPIENTRY glutCreateMenu( void(* callback)( int ) )
{
/*
* The menu object creation code resides in freeglut_structure.c
/*
* Add a sub menu to the bottom of the current menu
*/
-void FGAPIENTRY glutAddSubMenu( const char* label, int subMenuID )
+void FGAPIENTRY glutAddSubMenu( const char *label, int subMenuID )
{
- SFG_MenuEntry* menuEntry =
- (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
- SFG_Menu* subMenu = fgMenuByID( subMenuID );
+ SFG_MenuEntry *menuEntry =
+ ( SFG_MenuEntry * )calloc( sizeof( SFG_MenuEntry ), 1 );
+ SFG_Menu *subMenu = fgMenuByID( subMenuID );
freeglut_assert_ready;
freeglut_return_if_fail( fgStructure.Menu );
freeglut_return_if_fail( subMenu );
- menuEntry->Text = strdup( label );
+ menuEntry->Text = strdup( label );
menuEntry->SubMenu = subMenu;
menuEntry->ID = -1;
if( menuEntry->Text )
free( menuEntry->Text );
- menuEntry->Text = strdup( label );
+ menuEntry->Text = strdup( label );
menuEntry->ID = value;
menuEntry->SubMenu = NULL;
fghCalculateMenuBoxSize( );
/*
* Changes the specified menu item in the current menu into a sub-menu trigger.
*/
-void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int subMenuID )
+void FGAPIENTRY glutChangeToSubMenu( int item, const char* label,
+ int subMenuID )
{
SFG_Menu* subMenu = fgMenuByID( subMenuID );
SFG_MenuEntry* menuEntry = NULL;
if( menuEntry->Text )
free( menuEntry->Text );
- menuEntry->Text = strdup( label );
+ menuEntry->Text = strdup( label );
menuEntry->SubMenu = subMenu;
menuEntry->ID = -1;
fghCalculateMenuBoxSize( );
/*
* Make the parent window of the menu (and all submenus) the current window
*/
- fghSetSubmenuParentWindow ( fgStructure.Window, fgStructure.Menu ) ;
+ fghSetSubmenuParentWindow( fgStructure.Window, fgStructure.Menu );
}
/*