menubar.h

00001 /***************************************************************************
00002                           menubar.h  -  description
00003                              -------------------
00004     begin                : Mon Mar 29 2004
00005     copyright            : (C) 2004 by Dynacube Team
00006     email                :
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018  #ifndef __MENUBAR_H
00019  #define __MENUBAR_H
00020 
00021  #ifdef __cplusplus
00022    extern "C"
00023    {
00024      #include "common/ktypes.h"
00025      #include "common/stdlib.h"
00026      #include "gui/graphics.h"
00027      #include "common/string.h"
00028      #include "dev/keyboard/keyboard.h"
00029          #include "gui/gui_common.h"
00030    }
00031  #else
00032       #include "common/ktypes.h"
00033       #include "common/stdlib.h"
00034       #include "gui/graphics.h"
00035       #include "common/string.h"
00036       #include "dev/keyboard/keyboard.h"
00037  #endif
00038 
00039  #define MB_TEXT_COLOR   0x0
00040  #define MENUBAR_COLOR   0xFF7D //0x9CD1
00041  #define MENUBAR_HEIGHT  TITLE_HEIGHT
00042 
00043  #define MB_MAX_CHAR    10
00044  #define MB_MAX_MENU    6
00045 
00046  #include "gui/components/menu.h"
00047 
00048  class menubar
00049  {
00050    public :
00051           DW x, y, width, height;
00052     void *cnt_ptr;
00053         DB no_menu;
00054     SDB cur_menu;
00055     DD user_menu_addr;
00056 
00057           struct
00058           {
00059      char label[MB_MAX_CHAR];
00060      menu *menu_ptr;
00061           }mnu[MB_MAX_MENU];
00062 
00063 
00064    void menubar_init(void *_cnt_ptr,DW _x,DW _y,DW _width,DW _height,DD _usr_menu_addr, DW _pid);
00065    void paint();
00066    SDB process(DW _x,DW _y);
00067    void keyPress(DW state,DW ch);
00068    void freeAll();   
00069  };
00070 
00071 
00072  #endif 

Generated on Thu Jul 27 23:52:27 2006 for Dynacube by  doxygen 1.4.7