home *** CD-ROM | disk | FTP | other *** search
- //
- // The Fusion Library Interface for DOS
- // Version 1.06c
- // Copyright (C) 1990, 1991, 1992
- // Software Dimensions
- //
- // MenuControl --> MenuItems --> FusionWindow
- //
-
- #include "fliwin.h"
-
- #ifdef __BCPLUSPLUS__
- #pragma hdrstop
- #endif
-
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- //
- // FindNext()
- //
- // Finds the next available option
- //
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- void MenuManager::FindNext()
- {
- RemoveOption();
- int i=SubMenuTrack[CurrentLevel-1]->CurrentOption;
- int j=0;
- MenuItems &Menu=*SubMenuTrack[CurrentLevel-1];
- do i=(i==Menu.NumberOfOptions-1)?0:(++i);
- while ((!*(Menu.Option+i)->Available ||
- !(Menu.Option+i)->Option) &&
- ++j!=Menu.NumberOfOptions);
- MouseInControl=0;
- PlaceOption(i);
- }
-
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- //
- // FindLast()
- //
- // Finds the last available option
- //
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- void MenuManager::FindLast()
- {
- RemoveOption();
- int i=SubMenuTrack[CurrentLevel-1]->CurrentOption;
- int j=0;
- MenuItems &Menu=*SubMenuTrack[CurrentLevel-1];
- do i=(!i)?(Menu.NumberOfOptions-1):(--i);
- while ((!*(Menu.Option+i)->Available ||
- !(Menu.Option+i)->Option) &&
- ++j!=Menu.NumberOfOptions);
- MouseInControl=0;
- PlaceOption(i);
- }
-
-