Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : OOPMENU.ZIP
Filename : MENUBAR.PRG

 
Output of file : MENUBAR.PRG contained in archive : OOPMENU.ZIP
/*
MenuBar.prg - Class(y) menu bar class

Copyright (c) 1991, 1992 Chris Muller and Anton van Straaten
*/

#include "class(y).ch"

#define OPTION_SPACING 4


CREATE CLASS MenuBar FROM BaseMenu

PROTECTED:
METHOD initWin

EXPORT:
METHOD addItem
METHOD childRow, childCol
END CLASS


// pass parameters up to superclass (will not be necessary in Class(y) 2.0)
CONSTRUCTOR new( aItems ), ( aItems )
RETURN


METHOD PROCEDURE initWin
::window := Window():new( 0, 0, 0, 79, ::colorSpec ):show()
RETURN


METHOD PROCEDURE addItem( cLabel, oAction, isActive )
LOCAL nCol

// establish screen column for new option
IF LEN( ::items ) == 0
nCol := OPTION_SPACING
ELSE
nCol := ATail( ::items ):nextCol() + OPTION_SPACING
ENDIF

::addNewItem( 0, nCol, cLabel, oAction, isActive )
RETURN


METHOD childRow
RETURN 1


METHOD childCol
RETURN ::items[::currPos]:col


// eof menubar.prg


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : OOPMENU.ZIP
Filename : MENUBAR.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/