SFG_MenuEntry *entry;
int i = 1;
- for( entry = menu->Entries.First; entry; entry = entry->Node.Next)
+ for( entry = (SFG_MenuEntry *)menu->Entries.First; entry; entry = (SFG_MenuEntry *)entry->Node.Next)
{
if (i == index)
break;
/*
* First of all check any of the active sub menus...
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Is that an active sub menu by any case?
/*
* Mark all menu entries inactive...
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
menuEntry->IsActive = FALSE;
}
/*
* Check if any of the submenus is currently active...
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Has the menu been marked as active, maybe?
*/
glColor4f( 1, 1, 1, 1 );
- for( menuEntry = menu->Entries.First, i=0; menuEntry;
- menuEntry = menuEntry->Node.Next, ++i )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First, i=0; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next, ++i )
{
/*
* Move the raster into position...
/*
* Now we are ready to check if any of our children needs to be redrawn:
*/
- for( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Is that an active sub menu by any case?
menu->ParentWindow = window ;
- for ( menuEntry = menu->Entries.First; menuEntry; menuEntry = menuEntry->Node.Next )
+ for ( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
if ( menuEntry->SubMenu != NULL )
fghSetSubmenuParentWindow ( window, menuEntry->SubMenu ) ;
/*
* First of all check any of the active sub menus...
*/
- for( menuEntry = menu->Entries.First; menuEntry; menuEntry = menuEntry->Node.Next)
+ for( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry; menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next)
{
/*
* Is this menu entry active?
/*
* Hide all submenu windows, and the root menu's window.
*/
- for ( menuEntry = menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next )
+ for ( menuEntry = (SFG_MenuEntry *)menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next )
{
/*
* Is that an active submenu by any case?
fgDeactivateSubMenu ( menuEntry ) ;
}
- fgStructure.Window = current_window ;
+ fgSetWindow ( current_window ) ;
}
/*
/*
* Hide all submenu windows, and the root menu's window.
*/
- for ( subMenuIter = menuEntry->SubMenu->Entries.First; subMenuIter;
- subMenuIter = subMenuIter->Node.Next )
+ for ( subMenuIter = (SFG_MenuEntry *)menuEntry->SubMenu->Entries.First; subMenuIter;
+ subMenuIter = (SFG_MenuEntry *)subMenuIter->Node.Next )
{
/*
* Is that an active submenu by any case?
fgDeactivateSubMenu ( subMenuIter ) ;
}
- fgStructure.Window = current_window ;
+ fgSetWindow ( current_window ) ;
}
/*
/*
* The menu's box size depends on the menu entries:
*/
- for( menuEntry = fgStructure.Menu->Entries.First; menuEntry;
- menuEntry = menuEntry->Node.Next)
+ for( menuEntry = (SFG_MenuEntry *)fgStructure.Menu->Entries.First; menuEntry;
+ menuEntry = (SFG_MenuEntry *)menuEntry->Node.Next)
{
/*
* Update the menu entry's width value
*/
void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
{
- SFG_MenuEntry* menuEntry = calloc( sizeof(SFG_MenuEntry), 1 );
+ SFG_MenuEntry* menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
/*
* Make sure there is a current menu set
*/
void FGAPIENTRY glutAddSubMenu( const char* label, int subMenuID )
{
- SFG_MenuEntry* menuEntry = calloc( sizeof(SFG_MenuEntry), 1 );
+ SFG_MenuEntry* menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
SFG_Menu* subMenu = fgMenuByID( subMenuID );
/*