00001
00032 #ifndef LL_LLMENUGL_H
00033 #define LL_LLMENUGL_H
00034
00035 #include <list>
00036
00037 #include "llstring.h"
00038 #include "v4color.h"
00039 #include "llframetimer.h"
00040 #include "llevent.h"
00041
00042 #include "llkeyboard.h"
00043 #include "llfloater.h"
00044 #include "lluistring.h"
00045 #include "llview.h"
00046
00047 class LLMenuItemGL;
00048 class LLMenuHolderGL;
00049
00050 extern S32 MENU_BAR_HEIGHT;
00051 extern S32 MENU_BAR_WIDTH;
00052
00053
00054
00055 typedef void (*menu_callback)(void*);
00056
00057
00058
00059 typedef void (*on_disabled_callback)(void*);
00060
00061
00062
00063 typedef BOOL (*enabled_callback)(void*);
00064
00065
00066
00067 typedef BOOL (*check_callback)(void*);
00068
00069
00070
00071
00072 typedef void (*label_callback)(LLString&,void*);
00073
00074
00075
00076
00077
00078
00079
00080 class LLFontGL;
00081 class LLMenuGL;
00082
00083
00084 class LLMenuItemGL : public LLView
00085 {
00086 public:
00087 LLMenuItemGL( const LLString& name, const LLString& label, KEY key = KEY_NONE, MASK = MASK_NONE );
00088
00089 virtual void setValue(const LLSD& value) { setLabel(value.asString()); }
00090 virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM; }
00091 virtual LLString getWidgetTag() const { return LL_MENU_ITEM_TAG; }
00092
00093 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00094
00095 virtual LLString getType() const { return "item"; }
00096
00097 virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
00098 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
00099
00100 virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
00101
00102 BOOL getHighlight() const { return mHighlight; }
00103
00104 void setJumpKey(KEY key);
00105 KEY getJumpKey();
00106
00107
00108 void setFont(LLFontGL* font);
00109 void setFontStyle(U8 style) { mStyle = style; }
00110
00111
00112 virtual U32 getNominalHeight( void );
00113
00114
00115 static void setEnabledColor( const LLColor4& color );
00116 static void setDisabledColor( const LLColor4& color );
00117 static void setHighlightBGColor( const LLColor4& color );
00118 static void setHighlightFGColor( const LLColor4& color );
00119
00120
00121 virtual void setBriefItem(BOOL brief);
00122
00123 virtual BOOL addToAcceleratorList(std::list<LLKeyBinding*> *listp);
00124 void setAllowKeyRepeat(BOOL allow) { mAllowKeyRepeat = allow; }
00125
00126
00127 LLString getLabel( void ) const { return mLabel.getString(); }
00128
00129
00130 void setLabel( const LLStringExplicit& label );
00131 virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text );
00132
00133
00134 virtual LLMenuGL* getMenu();
00135
00136
00137
00138
00139 virtual U32 getNominalWidth( void );
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150 virtual void buildDrawLabel( void );
00151
00152
00153 virtual void updateBranchParent( LLView* parentp ){};
00154
00155
00156 virtual void doIt( void );
00157
00158
00159 virtual void setHighlight( BOOL highlight );
00160
00161
00162 virtual BOOL isActive( void ) const;
00163
00164
00165 virtual BOOL isOpen( void ) const;
00166
00167 virtual void setEnabledSubMenus(BOOL enable){};
00168
00169
00170 virtual BOOL handleKeyHere( KEY key, MASK mask, BOOL called_from_parent );
00171 virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
00172 virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
00173 virtual void draw( void );
00174
00175 BOOL getHover() { return mGotHover; }
00176
00177 BOOL getDrawTextDisabled() const { return mDrawTextDisabled; }
00178
00179 protected:
00180
00181
00182 void appendAcceleratorString( LLString& st );
00183
00184 public:
00185 static LLColor4 sEnabledColor;
00186 static LLColor4 sDisabledColor;
00187 static LLColor4 sHighlightBackground;
00188 static LLColor4 sHighlightForeground;
00189
00190 protected:
00191 static BOOL sDropShadowText;
00192
00193
00194 LLUIString mLabel;
00195
00196
00197
00198
00199 LLUIString mDrawBoolLabel;
00200 LLUIString mDrawAccelLabel;
00201 LLUIString mDrawBranchLabel;
00202
00203
00204 KEY mJumpKey;
00205 KEY mAcceleratorKey;
00206 MASK mAcceleratorMask;
00207 BOOL mAllowKeyRepeat;
00208 BOOL mHighlight;
00209 BOOL mGotHover;
00210
00211
00212
00213 BOOL mBriefItem;
00214
00215
00216 LLFontGL* mFont;
00217
00218 U8 mStyle;
00219 BOOL mDrawTextDisabled;
00220 };
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230 class LLMenuItemCallGL : public LLMenuItemGL
00231 {
00232 protected:
00233 menu_callback mCallback;
00234
00235 enabled_callback mEnabledCallback;
00236 label_callback mLabelCallback;
00237 void* mUserData;
00238 on_disabled_callback mOnDisabledCallback;
00239
00240 public:
00241
00242 LLMenuItemCallGL( const LLString& name,
00243 menu_callback clicked_cb,
00244 enabled_callback enabled_cb = NULL,
00245 void* user_data = NULL,
00246 KEY key = KEY_NONE, MASK mask = MASK_NONE,
00247 BOOL enabled = TRUE,
00248 on_disabled_callback on_disabled_cb = NULL);
00249 LLMenuItemCallGL( const LLString& name,
00250 const LLString& label,
00251 menu_callback clicked_cb,
00252 enabled_callback enabled_cb = NULL,
00253 void* user_data = NULL,
00254 KEY key = KEY_NONE, MASK mask = MASK_NONE,
00255 BOOL enabled = TRUE,
00256 on_disabled_callback on_disabled_cb = NULL);
00257
00258
00259 LLMenuItemCallGL( const LLString& name,
00260 const LLString& label,
00261 menu_callback clicked_cb,
00262 enabled_callback enabled_cb,
00263 label_callback label_cb,
00264 void* user_data,
00265 KEY key = KEY_NONE, MASK mask = MASK_NONE,
00266 BOOL enabled = TRUE,
00267 on_disabled_callback on_disabled_c = NULL);
00268 LLMenuItemCallGL( const LLString& name,
00269 menu_callback clicked_cb,
00270 enabled_callback enabled_cb,
00271 label_callback label_cb,
00272 void* user_data,
00273 KEY key = KEY_NONE, MASK mask = MASK_NONE,
00274 BOOL enabled = TRUE,
00275 on_disabled_callback on_disabled_c = NULL);
00276 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00277
00278 virtual LLString getType() const { return "call"; }
00279
00280 virtual EWidgetType getWidgetType() const;
00281 virtual LLString getWidgetTag() const;
00282
00283 void setEnabledControl(LLString enabled_control, LLView *context);
00284 void setVisibleControl(LLString enabled_control, LLView *context);
00285
00286 void setMenuCallback(menu_callback callback, void* data) { mCallback = callback; mUserData = data; };
00287 menu_callback getMenuCallback() const { return mCallback; }
00288
00289 void setEnabledCallback(enabled_callback callback) { mEnabledCallback = callback; };
00290
00291 void setUserData(void *userdata) { mUserData = userdata; }
00292 void* getUserData() const { return mUserData; }
00293
00294
00295 virtual void buildDrawLabel( void );
00296
00297
00298 virtual void doIt( void );
00299
00300 virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
00301
00302
00303
00304 virtual bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
00305 };
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317 class LLMenuItemCheckGL
00318 : public LLMenuItemCallGL
00319 {
00320 protected:
00321 check_callback mCheckCallback;
00322 BOOL mChecked;
00323
00324 public:
00325 LLMenuItemCheckGL( const LLString& name,
00326 const LLString& label,
00327 menu_callback callback,
00328 enabled_callback enabled_cb,
00329 check_callback check,
00330 void* user_data,
00331 KEY key = KEY_NONE, MASK mask = MASK_NONE );
00332 LLMenuItemCheckGL( const LLString& name,
00333 menu_callback callback,
00334 enabled_callback enabled_cb,
00335 check_callback check,
00336 void* user_data,
00337 KEY key = KEY_NONE, MASK mask = MASK_NONE );
00338 LLMenuItemCheckGL( const LLString& name,
00339 const LLString& label,
00340 menu_callback callback,
00341 enabled_callback enabled_cb,
00342 LLString control_name,
00343 LLView *context,
00344 void* user_data,
00345 KEY key = KEY_NONE, MASK mask = MASK_NONE );
00346 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00347
00348 void setCheckedControl(LLString checked_control, LLView *context);
00349
00350 virtual void setValue(const LLSD& value) { mChecked = value.asBoolean(); }
00351 virtual EWidgetType getWidgetType() const;
00352 virtual LLString getWidgetTag() const;
00353
00354 virtual LLString getType() const { return "check"; }
00355
00356
00357 virtual void buildDrawLabel( void );
00358
00359 virtual bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
00360
00361
00362
00363 };
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373 class LLMenuItemToggleGL : public LLMenuItemGL
00374 {
00375 protected:
00376 BOOL* mToggle;
00377
00378 public:
00379 LLMenuItemToggleGL( const LLString& name, const LLString& label,
00380 BOOL* toggle,
00381 KEY key = KEY_NONE, MASK mask = MASK_NONE );
00382
00383 LLMenuItemToggleGL( const LLString& name,
00384 BOOL* toggle,
00385 KEY key = KEY_NONE, MASK mask = MASK_NONE );
00386
00387 virtual LLString getType() const { return "toggle"; }
00388
00389
00390 virtual void buildDrawLabel( void );
00391
00392
00393 virtual void doIt( void );
00394
00395
00396
00397 };
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411 class LLMenuArrowGL;
00412 class LLMenuItemBranchGL;
00413 class LLMenuItemTearOffGL;
00414
00415 class LLMenuGL
00416 : public LLUICtrl
00417 {
00418 public:
00419 LLMenuGL( const LLString& name, const LLString& label, LLViewHandle parent_floater = LLViewHandle::sDeadHandle );
00420 LLMenuGL( const LLString& label, LLViewHandle parent_floater = LLViewHandle::sDeadHandle );
00421 virtual ~LLMenuGL( void );
00422 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00423 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
00424
00425 void parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory);
00426
00427 virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU; }
00428 virtual LLString getWidgetTag() const { return LL_MENU_GL_TAG; }
00429
00430
00431 virtual BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent );
00432
00433 virtual BOOL handleUnicodeCharHere( llwchar uni_char, BOOL called_from_parent );
00434 virtual BOOL handleHover( S32 x, S32 y, MASK mask );
00435 virtual void draw( void );
00436 virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color);
00437 virtual void setVisible(BOOL visible);
00438
00439 virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
00440
00441 LLMenuGL* getChildMenuByName(const LLString& name, BOOL recurse) const;
00442
00443 BOOL clearHoverItem();
00444
00445
00446 const LLString& getLabel( void ) const { return mLabel.getString(); }
00447 void setLabel(const LLStringExplicit& label) { mLabel = label; }
00448
00449 static void setDefaultBackgroundColor( const LLColor4& color );
00450 void setBackgroundColor( const LLColor4& color );
00451 LLColor4 getBackgroundColor();
00452 void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
00453 void setCanTearOff(BOOL tear_off, LLViewHandle parent_floater_handle = LLViewHandle::sDeadHandle);
00454
00455
00456 virtual BOOL append( LLMenuItemGL* item );
00457
00458
00459 virtual BOOL appendSeparator( const LLString &separator_name = "separator" );
00460
00461
00462 virtual BOOL appendMenu( LLMenuGL* menu );
00463
00464
00465 virtual void updateParent( LLView* parentp );
00466
00467
00468
00469
00470 void setItemEnabled( const LLString& name, BOOL enable );
00471
00472
00473 void setEnabledSubMenus(BOOL enable);
00474
00475 void setItemVisible( const LLString& name, BOOL visible);
00476
00477
00478 void setLeftAndBottom(S32 left, S32 bottom);
00479
00480 virtual BOOL handleJumpKey(KEY key);
00481
00482 virtual BOOL jumpKeysActive();
00483
00484 virtual BOOL isOpen();
00485
00486
00487
00488
00489
00490 virtual void arrange( void );
00491
00492
00493 void empty( void );
00494
00495
00496
00497
00498
00499 void setItemLastSelected(LLMenuItemGL* item);
00500 U32 getItemCount();
00501 LLMenuItemGL* getItem(S32 number);
00502 LLMenuItemGL* getHighlightedItem();
00503
00504 LLMenuItemGL* highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE);
00505 LLMenuItemGL* highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disabled = TRUE);
00506
00507 void buildDrawLabels();
00508 void createJumpKeys();
00509
00510
00511 static void showPopup(LLMenuGL* menu);
00512
00513
00514 static void showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y);
00515
00516
00517 void setDropShadowed( const BOOL shadowed );
00518
00519 void setParentMenuItem( LLMenuItemGL* parent_menu_item ) { mParentMenuItem = parent_menu_item; }
00520 LLMenuItemGL* getParentMenuItem() { return mParentMenuItem; }
00521
00522 void setTornOff(BOOL torn_off);
00523 BOOL getTornOff() { return mTornOff; }
00524
00525 BOOL getCanTearOff() { return mTearOffItem != NULL; }
00526
00527 KEY getJumpKey() { return mJumpKey; }
00528 void setJumpKey(KEY key) { mJumpKey = key; }
00529
00530 static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; }
00531 static BOOL getKeyboardMode() { return sKeyboardMode; }
00532
00533 static void onFocusLost(LLView* old_focus);
00534
00535 static LLMenuHolderGL* sMenuContainer;
00536
00537 protected:
00538 void createSpilloverBranch();
00539 void cleanupSpilloverBranch();
00540
00541 protected:
00542 static LLColor4 sDefaultBackgroundColor;
00543 static BOOL sKeyboardMode;
00544
00545 LLColor4 mBackgroundColor;
00546 BOOL mBgVisible;
00547 typedef std::list< LLMenuItemGL* > item_list_t;
00548 item_list_t mItems;
00549 typedef std::map<KEY, LLMenuItemGL*> navigation_key_map_t;
00550 navigation_key_map_t mJumpKeys;
00551 LLMenuItemGL* mParentMenuItem;
00552 LLUIString mLabel;
00553 BOOL mDropShadowed;
00554 BOOL mHorizontalLayout;
00555 BOOL mKeepFixedSize;
00556 BOOL mHasSelection;
00557 LLFrameTimer mFadeTimer;
00558 S32 mLastMouseX;
00559 S32 mLastMouseY;
00560 S32 mMouseVelX;
00561 S32 mMouseVelY;
00562 BOOL mTornOff;
00563 LLMenuItemTearOffGL* mTearOffItem;
00564 LLMenuItemBranchGL* mSpilloverBranch;
00565 LLMenuGL* mSpilloverMenu;
00566 LLViewHandle mParentFloaterHandle;
00567 KEY mJumpKey;
00568 };
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579 class LLMenuItemBranchGL : public LLMenuItemGL
00580 {
00581 protected:
00582 LLMenuGL* mBranch;
00583
00584 public:
00585 LLMenuItemBranchGL( const LLString& name, const LLString& label, LLMenuGL* branch,
00586 KEY key = KEY_NONE, MASK mask = MASK_NONE );
00587 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00588
00589 virtual LLView* getChildByName(const LLString& name, BOOL recurse) const;
00590
00591 virtual LLString getType() const { return "menu"; }
00592
00593 virtual EWidgetType getWidgetType() const;
00594 virtual LLString getWidgetTag() const;
00595
00596 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
00597
00598 virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
00599
00600
00601 virtual BOOL addToAcceleratorList(std::list <LLKeyBinding*> *listp);
00602
00603
00604 virtual void buildDrawLabel( void );
00605
00606
00607 virtual void doIt( void );
00608
00609 virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
00610 virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
00611
00612
00613
00614 virtual void setHighlight( BOOL highlight );
00615
00616 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
00617
00618 virtual BOOL isActive() const;
00619
00620 virtual BOOL isOpen() const;
00621
00622 LLMenuGL *getBranch() const { return mBranch; }
00623
00624 virtual void updateBranchParent( LLView* parentp );
00625
00626
00627 virtual void onVisibilityChange( BOOL curVisibilityIn );
00628
00629 virtual void draw();
00630
00631 virtual void setEnabledSubMenus(BOOL enabled);
00632
00633 virtual void openMenu();
00634 };
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644 class LLPieMenu
00645 : public LLMenuGL
00646 {
00647 public:
00648 LLPieMenu(const LLString& name, const LLString& label);
00649 LLPieMenu(const LLString& name);
00650 virtual ~LLPieMenu();
00651
00652 virtual EWidgetType getWidgetType() const;
00653 virtual LLString getWidgetTag() const;
00654
00655 void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory);
00656
00657
00658
00659 virtual void setVisible(BOOL visible);
00660
00661
00662 virtual BOOL handleHover( S32 x, S32 y, MASK mask );
00663 virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
00664 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
00665 virtual BOOL handleRightMouseUp( S32 x, S32 y, MASK mask );
00666 virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
00667 virtual void draw();
00668 virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color);
00669
00670 virtual BOOL append(LLMenuItemGL* item);
00671 virtual BOOL appendSeparator( const LLString &separator_name = "separator" );
00672
00673
00674
00675
00676 virtual BOOL appendMenu(LLPieMenu *menu,
00677 enabled_callback enabled_cb = NULL,
00678 void* user_data = NULL );
00679 virtual void arrange( void );
00680
00681
00682 void show(S32 x, S32 y, BOOL mouse_down);
00683 void hide(BOOL item_selected);
00684
00685 protected:
00686 LLMenuItemGL *pieItemFromXY(S32 x, S32 y);
00687 S32 pieItemIndexFromXY(S32 x, S32 y);
00688
00689 private:
00690
00691
00692
00693
00694
00695 BOOL mFirstMouseDown;
00696 BOOL mUseInfiniteRadius;
00697 LLMenuItemGL* mHoverItem;
00698 BOOL mHoverThisFrame;
00699 BOOL mHoveredAnyItem;
00700 LLFrameTimer mShrinkBorderTimer;
00701 F32 mOuterRingAlpha;
00702 F32 mCurRadius;
00703 BOOL mRightMouseDown;
00704 };
00705
00706
00707
00708
00709
00710
00711
00712 class LLMenuBarGL : public LLMenuGL
00713 {
00714 protected:
00715 std::list <LLKeyBinding*> mAccelerators;
00716 BOOL mAltKeyTrigger;
00717
00718 public:
00719 LLMenuBarGL( const LLString& name );
00720 virtual ~LLMenuBarGL();
00721 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00722 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
00723
00724 virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_BAR; }
00725 virtual LLString getWidgetTag() const { return LL_MENU_BAR_GL_TAG; }
00726
00727 virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
00728 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
00729 virtual BOOL handleJumpKey(KEY key);
00730
00731
00732
00733 virtual void arrange( void );
00734 virtual void draw();
00735 virtual BOOL jumpKeysActive();
00736
00737
00738 virtual BOOL appendSeparator( const LLString &separator_name = "separator" );
00739
00740
00741 virtual BOOL appendMenu( LLMenuGL* menu );
00742
00743
00744 virtual BOOL handleHover( S32 x, S32 y, MASK mask );
00745
00746
00747 S32 getRightmostMenuEdge();
00748
00749 void resetMenuTrigger() { mAltKeyTrigger = FALSE; }
00750
00751 protected:
00752 void checkMenuTrigger();
00753
00754 };
00755
00756
00757
00758
00759
00760
00761 class LLMenuHolderGL : public LLPanel
00762 {
00763 public:
00764 LLMenuHolderGL();
00765 LLMenuHolderGL(const LLString& name, const LLRect& rect, BOOL mouse_opaque, U32 follows = FOLLOWS_NONE);
00766 virtual ~LLMenuHolderGL();
00767
00768 virtual EWidgetType getWidgetType() const;
00769 virtual LLString getWidgetTag() const;
00770
00771 virtual BOOL hideMenus();
00772 void reshape(S32 width, S32 height, BOOL called_from_parent);
00773 void setCanHide(BOOL can_hide) { mCanHide = can_hide; }
00774
00775
00776 virtual void draw();
00777 virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
00778 virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
00779
00780 virtual const LLRect getMenuRect() const;
00781 virtual BOOL hasVisibleMenu() const;
00782
00783 static void setActivatedItem(LLMenuItemGL* item);
00784
00785 protected:
00786 static LLViewHandle sItemLastSelectedHandle;
00787 static LLFrameTimer sItemActivationTimer;
00788
00789 BOOL mCanHide;
00790 };
00791
00792
00793
00794
00795
00796
00797 class LLTearOffMenu : public LLFloater
00798 {
00799 public:
00800 static LLTearOffMenu* create(LLMenuGL* menup);
00801 virtual ~LLTearOffMenu();
00802 virtual void onClose(bool app_quitting);
00803 virtual void draw(void);
00804 virtual void onFocusReceived();
00805 virtual void onFocusLost();
00806 virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
00807 virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
00808 virtual void translate(S32 x, S32 y);
00809
00810 protected:
00811 LLTearOffMenu(LLMenuGL* menup);
00812
00813 protected:
00814 LLView* mOldParent;
00815 LLMenuGL* mMenu;
00816 F32 mTargetHeight;
00817 };
00818
00819
00820
00821
00822
00823
00824
00825 class LLMenuItemTearOffGL : public LLMenuItemGL
00826 {
00827 public:
00828 LLMenuItemTearOffGL( LLViewHandle parent_floater_handle = (LLViewHandle)LLViewHandle::sDeadHandle );
00829
00830 virtual EWidgetType getWidgetType() const;
00831 virtual LLString getWidgetTag() const;
00832
00833 virtual LLString getType() const { return "tearoff_menu"; }
00834
00835 virtual void doIt(void);
00836 virtual void draw(void);
00837 virtual U32 getNominalHeight();
00838
00839 protected:
00840 LLViewHandle mParentHandle;
00841 };
00842
00843
00844
00845 class LLEditMenuHandlerMgr
00846 {
00847 public:
00848 LLEditMenuHandlerMgr& getInstance();
00849 virtual ~LLEditMenuHandlerMgr();
00850 protected:
00851 LLEditMenuHandlerMgr();
00852
00853 };
00854
00855 #endif // LL_LLMENUGL_H