1*cd39deccSStefano Ceccherini /* 2*cd39deccSStefano Ceccherini * Copyright 2001-2006, Haiku, Inc. 3*cd39deccSStefano Ceccherini * Distributed under the terms of the MIT License. 4*cd39deccSStefano Ceccherini * 5*cd39deccSStefano Ceccherini * Authors: 6*cd39deccSStefano Ceccherini * Marc Flerackers (mflerackers@androme.be) 7*cd39deccSStefano Ceccherini * Stephan Aßmus <superstippi@gmx.de> 8*cd39deccSStefano Ceccherini */ 9*cd39deccSStefano Ceccherini 107ea7a892SMarc Flerackers 117ea7a892SMarc Flerackers #ifndef _BMC_PRIVATE_H 127ea7a892SMarc Flerackers #define _BMC_PRIVATE_H 137ea7a892SMarc Flerackers 147ea7a892SMarc Flerackers #include <BeBuild.h> 157ea7a892SMarc Flerackers #include <MenuBar.h> 167ea7a892SMarc Flerackers #include <MenuItem.h> 17*cd39deccSStefano Ceccherini #include <MessageFilter.h> 187ea7a892SMarc Flerackers 19*cd39deccSStefano Ceccherini class _BMCFilter_ : public BMessageFilter { 20*cd39deccSStefano Ceccherini public: 21*cd39deccSStefano Ceccherini _BMCFilter_(BMenuField *menuField, uint32 what); 22*cd39deccSStefano Ceccherini ~_BMCFilter_(); 23*cd39deccSStefano Ceccherini filter_result Filter(BMessage *message, BHandler **handler); 247ea7a892SMarc Flerackers 25*cd39deccSStefano Ceccherini private: 26*cd39deccSStefano Ceccherini _BMCFilter_ &operator=(const _BMCFilter_ &); 27*cd39deccSStefano Ceccherini BMenuField *fMenuField; 28*cd39deccSStefano Ceccherini }; 29*cd39deccSStefano Ceccherini 307ea7a892SMarc Flerackers 317ea7a892SMarc Flerackers //------------------------------------------------------------------------------ 327ea7a892SMarc Flerackers class _BMCMenuBar_ : public BMenuBar { 337ea7a892SMarc Flerackers 347ea7a892SMarc Flerackers public: 357ea7a892SMarc Flerackers _BMCMenuBar_(BRect frame, bool fixed_size, 367ea7a892SMarc Flerackers BMenuField *menuField); 377ea7a892SMarc Flerackers _BMCMenuBar_(BMessage *data); 387ea7a892SMarc Flerackers virtual ~_BMCMenuBar_(); 397ea7a892SMarc Flerackers 407ea7a892SMarc Flerackers static BArchivable *Instantiate(BMessage *data); 417ea7a892SMarc Flerackers 427ea7a892SMarc Flerackers virtual void AttachedToWindow(); 432e6a5805SStephan Aßmus virtual void Draw(BRect updateRect); 447ea7a892SMarc Flerackers virtual void FrameResized(float width, float height); 457ea7a892SMarc Flerackers virtual void MessageReceived(BMessage* msg); 467ea7a892SMarc Flerackers virtual void MakeFocus(bool focused = true); 47*cd39deccSStefano Ceccherini 48*cd39deccSStefano Ceccherini void TogglePopUpMarker(bool show) { fShowPopUpMarker = show; } 49*cd39deccSStefano Ceccherini bool IsPopUpMarkerShown() const { return fShowPopUpMarker; } 507ea7a892SMarc Flerackers 517ea7a892SMarc Flerackers private: 527ea7a892SMarc Flerackers _BMCMenuBar_&operator=(const _BMCMenuBar_ &); 537ea7a892SMarc Flerackers 547ea7a892SMarc Flerackers BMenuField *fMenuField; 557ea7a892SMarc Flerackers bool fFixedSize; 567ea7a892SMarc Flerackers BMessageRunner *fRunner; 57*cd39deccSStefano Ceccherini bool fShowPopUpMarker; 587ea7a892SMarc Flerackers }; 597ea7a892SMarc Flerackers //------------------------------------------------------------------------------ 607ea7a892SMarc Flerackers 617ea7a892SMarc Flerackers #endif // _BMC_PRIVATE_H 62