1446b8c19SStefano Ceccherini //------------------------------------------------------------------------------ 2a3dff518SStefano Ceccherini // Copyright (c) 2003-2004, Haiku, Inc. 3446b8c19SStefano Ceccherini // 4446b8c19SStefano Ceccherini // Permission is hereby granted, free of charge, to any person obtaining a 5446b8c19SStefano Ceccherini // copy of this software and associated documentation files (the "Software"), 6446b8c19SStefano Ceccherini // to deal in the Software without restriction, including without limitation 7446b8c19SStefano Ceccherini // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8446b8c19SStefano Ceccherini // and/or sell copies of the Software, and to permit persons to whom the 9446b8c19SStefano Ceccherini // Software is furnished to do so, subject to the following conditions: 10446b8c19SStefano Ceccherini // 11446b8c19SStefano Ceccherini // The above copyright notice and this permission notice shall be included in 12446b8c19SStefano Ceccherini // all copies or substantial portions of the Software. 13446b8c19SStefano Ceccherini // 14446b8c19SStefano Ceccherini // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15446b8c19SStefano Ceccherini // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16446b8c19SStefano Ceccherini // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17446b8c19SStefano Ceccherini // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18446b8c19SStefano Ceccherini // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19446b8c19SStefano Ceccherini // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20446b8c19SStefano Ceccherini // DEALINGS IN THE SOFTWARE. 21446b8c19SStefano Ceccherini // 22446b8c19SStefano Ceccherini // File Name: MenuWindow.h 23446b8c19SStefano Ceccherini // Authors: Marc Flerackers (mflerackers@androme.be) 24446b8c19SStefano Ceccherini // Stefano Ceccherini (burton666@libero.it) 25446b8c19SStefano Ceccherini // Description: BMenuWindow is the custom BWindow for menus. 26446b8c19SStefano Ceccherini //------------------------------------------------------------------------------ 27446b8c19SStefano Ceccherini #ifndef __MENUWINDOW_H 28446b8c19SStefano Ceccherini #define __MENUWINDOW_H 29446b8c19SStefano Ceccherini 30446b8c19SStefano Ceccherini #include <Window.h> 31446b8c19SStefano Ceccherini 32446b8c19SStefano Ceccherini class BMenu; 33a3dff518SStefano Ceccherini class BMenuScroller; 34a3dff518SStefano Ceccherini 35446b8c19SStefano Ceccherini class BMenuWindow : public BWindow { 36446b8c19SStefano Ceccherini public: 37*4185bd8bSStefano Ceccherini BMenuWindow(const char *name); 38446b8c19SStefano Ceccherini virtual ~BMenuWindow(); 39446b8c19SStefano Ceccherini 40*4185bd8bSStefano Ceccherini void AttachMenu(BMenu *menu); 41*4185bd8bSStefano Ceccherini void DetachMenu(); 42*4185bd8bSStefano Ceccherini 43a3dff518SStefano Ceccherini void UpdateScrollers(); 44446b8c19SStefano Ceccherini 45446b8c19SStefano Ceccherini private: 46a3dff518SStefano Ceccherini BMenuScroller *fUpperScroller; 47a3dff518SStefano Ceccherini BMenuScroller *fLowerScroller; 48446b8c19SStefano Ceccherini }; 49446b8c19SStefano Ceccherini 50446b8c19SStefano Ceccherini #endif 51