1cd39deccSStefano Ceccherini /* 20699a883SStephan Aßmus * Copyright 2001-2009 Haiku, Inc. All rights reserved. 3cd39deccSStefano Ceccherini * Distributed under the terms of the MIT License. 4cd39deccSStefano Ceccherini * 5cd39deccSStefano Ceccherini * Authors: 6cd39deccSStefano Ceccherini * Marc Flerackers (mflerackers@androme.be) 7cd39deccSStefano Ceccherini * Stephan Aßmus <superstippi@gmx.de> 8cd39deccSStefano Ceccherini */ 97ea7a892SMarc Flerackers #ifndef _BMC_PRIVATE_H 107ea7a892SMarc Flerackers #define _BMC_PRIVATE_H 117ea7a892SMarc Flerackers 12f6e4cbb9SAxel Dörfler 137ea7a892SMarc Flerackers #include <BeBuild.h> 147ea7a892SMarc Flerackers #include <MenuBar.h> 157ea7a892SMarc Flerackers #include <MenuItem.h> 16cd39deccSStefano Ceccherini #include <MessageFilter.h> 177ea7a892SMarc Flerackers 18f6e4cbb9SAxel Dörfler class BMessageRunner; 19f6e4cbb9SAxel Dörfler 20f6e4cbb9SAxel Dörfler 21cd39deccSStefano Ceccherini class _BMCFilter_ : public BMessageFilter { 22cd39deccSStefano Ceccherini public: 23cd39deccSStefano Ceccherini _BMCFilter_(BMenuField* menuField, uint32 what); 24f6e4cbb9SAxel Dörfler virtual ~_BMCFilter_(); 250699a883SStephan Aßmus 260699a883SStephan Aßmus virtual filter_result Filter(BMessage* message, BHandler** handler); 277ea7a892SMarc Flerackers 28cd39deccSStefano Ceccherini private: 29cd39deccSStefano Ceccherini _BMCFilter_& operator=(const _BMCFilter_&); 300699a883SStephan Aßmus 31cd39deccSStefano Ceccherini BMenuField* fMenuField; 32cd39deccSStefano Ceccherini }; 33cd39deccSStefano Ceccherini 347ea7a892SMarc Flerackers 357ea7a892SMarc Flerackers class _BMCMenuBar_ : public BMenuBar { 367ea7a892SMarc Flerackers public: 370699a883SStephan Aßmus _BMCMenuBar_(BRect frame, bool fixedSize, 380699a883SStephan Aßmus BMenuField* menuField); 390699a883SStephan Aßmus _BMCMenuBar_(bool fixedSize, 407ea7a892SMarc Flerackers BMenuField* menuField); 417ea7a892SMarc Flerackers _BMCMenuBar_(BMessage* data); 427ea7a892SMarc Flerackers virtual ~_BMCMenuBar_(); 437ea7a892SMarc Flerackers 447ea7a892SMarc Flerackers static BArchivable* Instantiate(BMessage* data); 457ea7a892SMarc Flerackers 467ea7a892SMarc Flerackers virtual void AttachedToWindow(); 472e6a5805SStephan Aßmus virtual void Draw(BRect updateRect); 487ea7a892SMarc Flerackers virtual void FrameResized(float width, float height); 497ea7a892SMarc Flerackers virtual void MessageReceived(BMessage* msg); 507ea7a892SMarc Flerackers virtual void MakeFocus(bool focused = true); 51cd39deccSStefano Ceccherini 520699a883SStephan Aßmus void TogglePopUpMarker(bool show) 530699a883SStephan Aßmus { fShowPopUpMarker = show; } 540699a883SStephan Aßmus bool IsPopUpMarkerShown() const 550699a883SStephan Aßmus { return fShowPopUpMarker; } 567ea7a892SMarc Flerackers 57*102a66c3SRene Gollent virtual BSize MinSize(); 58ec592aa9SIngo Weinhold virtual BSize MaxSize(); 59ec592aa9SIngo Weinhold 607ea7a892SMarc Flerackers private: 617ea7a892SMarc Flerackers _BMCMenuBar_&operator=(const _BMCMenuBar_&); 627ea7a892SMarc Flerackers 630699a883SStephan Aßmus void _Init(bool setMaxContentWidth); 640699a883SStephan Aßmus 657ea7a892SMarc Flerackers BMenuField* fMenuField; 667ea7a892SMarc Flerackers bool fFixedSize; 677ea7a892SMarc Flerackers BMessageRunner* fRunner; 68cd39deccSStefano Ceccherini bool fShowPopUpMarker; 693a38a485SStephan Aßmus float fPreviousWidth; 707ea7a892SMarc Flerackers }; 717ea7a892SMarc Flerackers 727ea7a892SMarc Flerackers #endif // _BMC_PRIVATE_H 73