22 BEGIN_IGRAPHICS_NAMESPACE
69 void OnEndAnimation()
override;
143 IRECT GetLargestCellRectForMenu(
IPopupMenu& menu,
float x,
float y)
const;
149 void GetPanelDimensions(
IPopupMenu&menu,
float& width,
float& height)
const;
152 void Expand(
const IRECT& bounds);
155 virtual void CollapseEverything();
166 MenuPanel(
const MenuPanel&) =
delete;
167 MenuPanel& operator=(
const MenuPanel&) =
delete;
170 float CellWidth()
const {
return mSingleCellBounds.W(); }
173 float CellHeight()
const {
return mSingleCellBounds.H(); }
175 void ScrollUp() { mScrollItemOffset--; mScrollItemOffset =
Clip(mScrollItemOffset, 0, mCellBounds.GetSize()-1); }
177 void ScrollDown() { mScrollItemOffset++; mScrollItemOffset =
Clip(mScrollItemOffset, 0, mMenu.NItems()-mCellBounds.GetSize()); }
183 IRECT* HitTestCells(
float x,
float y)
const;
187 WDL_PtrList<IRECT> mCellBounds;
191 int mScrollMaxRows = 0;
192 bool mShouldDraw =
true;
193 IBlend mBlend = { EBlend::Default, 0.f };
195 IRECT mSingleCellBounds;
196 IRECT* mHighlightedCell =
nullptr;
197 IRECT* mClickedCell =
nullptr;
199 bool mScroller =
false;
200 int mScrollItemOffset = 0;
202 #ifndef IGRAPHICS_NANOVG 207 WDL_PtrList<MenuPanel> mMenuPanels;
208 MenuPanel* mActiveMenuPanel =
nullptr;
209 MenuPanel* mAppearingMenuPanel =
nullptr;
211 IRECT* mMouseCellBounds =
nullptr;
214 int mMaxColumnItems = 0;
215 bool mScrollIfTooBig =
true;
216 bool mCallOut =
false;
217 bool mMenuHasSubmenu =
false;
218 bool mForcedSouth =
true;
219 bool mSubmenuOnRight =
true;
220 bool mSubMenuOpened =
false;
222 float mCellGap = 2.f;
223 float mSeparatorSize = 2.;
224 float mRoundness = 5.f;
225 float mDropShadowSize = 10.f;
226 float mOpacity = 0.95f;
227 float mMenuShift = 0.f;
229 const float TEXT_HPAD = 5.;
230 const float TICK_SIZE = 10.;
231 const float ARROW_SIZE = 8;
232 const float PAD = 5.;
233 const float CALLOUT_SPACE = 8;
235 EArrowDir mCalloutArrowDir = kEast;
236 IRECT mCalloutArrowBounds;
237 IRECT mSubMenuCalloutArrowBounds;
241 IColor mPanelBackgroundColor = COLOR_WHITE;
242 IColor mCellBackGroundColor = COLOR_BLUE;
243 IColor mItemMouseoverColor = COLOR_WHITE;
244 IColor mItemColor = COLOR_BLACK;
245 IColor mDisabledItemColor = COLOR_GRAY;
246 IColor mSeparatorColor = COLOR_MID_GRAY;
249 IRECT mSpecifiedCollapsedBounds;
250 IRECT mSpecifiedExpandedBounds;
253 END_IGRAPHICS_NAMESPACE
The lowest level base class of an IGraphics control.
Used to manage a rectangular area, independent of draw class/platform.
Used to manage composite/blend operations, independent of draw class/platform.
Used to manage mouse modifiers i.e.
Used to manage color data, independent of draw class/platform.
This file contains the base IControl implementation, along with some base classes for specific types ...
IText is used to manage font and text/text entry style for a piece of text on the UI...
The lowest level base class of an IGraphics context.
BEGIN_IPLUG_NAMESPACE T Clip(T x, T lo, T hi)
Clips the value x between lo and hi.
std::unique_ptr< ILayer > ILayerPtr
ILayerPtr is a managed pointer for transferring the ownership of layers.