diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2024-03-10 15:36:58 -0700 | 
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2024-03-10 15:36:58 -0700 | 
| commit | d67a3022d3a9432f279768371b27ea5322315905 (patch) | |
| tree | 0254d8a7889ff6639cf6bf9b40f63499df37ceb4 /indra/llui/llscrollingpanellist.h | |
| parent | fc462b2b0f7ee153626d162bd97a05110f0804b7 (diff) | |
| parent | b242d696ba03f66494dfca1f05a74ed1b15cd6e4 (diff) | |
Merge branch 'main' of github.com:secondlife/viewer-private into roxie/webrtc-voice
Diffstat (limited to 'indra/llui/llscrollingpanellist.h')
| -rw-r--r-- | indra/llui/llscrollingpanellist.h | 39 | 
1 files changed, 28 insertions, 11 deletions
| diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h index e8df176ec3..d625039427 100644 --- a/indra/llui/llscrollingpanellist.h +++ b/indra/llui/llscrollingpanellist.h @@ -45,18 +45,24 @@ public:  /* - * A set of panels that are displayed in a vertical sequence inside a scroll container. + * A set of panels that are displayed in a sequence inside a scroll container.   */  class LLScrollingPanelList : public LLUICtrl  {  public:  	struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> -	{}; -	LLScrollingPanelList(const Params& p) -	:	LLUICtrl(p)  -	{} +	{ +		Optional<bool> is_horizontal; +		Optional<S32> padding; +		Optional<S32> spacing; + +		Params(); +	}; + +	LLScrollingPanelList(const Params& p); -	static const S32 GAP_BETWEEN_PANELS = 6; +	static const S32 DEFAULT_SPACING = 6; +	static const S32 DEFAULT_PADDING = 2;  	typedef std::deque<LLScrollingPanel*>	panel_list_t; @@ -65,11 +71,18 @@ public:  	virtual void		draw();  	void				clearPanels(); -	S32					addPanel( LLScrollingPanel* panel ); -	void				removePanel( LLScrollingPanel* panel ); -	void				removePanel( U32 panel_index ); +	S32					addPanel(LLScrollingPanel* panel, bool back = false); +	void				removePanel(LLScrollingPanel* panel); +	void				removePanel(U32 panel_index);  	void				updatePanels(BOOL allow_modify); -	const panel_list_t&	getPanelList() { return mPanelList; } +	void				rearrange(); + +	const panel_list_t&	getPanelList() const { return mPanelList; } +	bool				getIsHorizontal() const { return mIsHorizontal; } +	void				setPadding(S32 padding) { mPadding = padding; rearrange(); } +	void				setSpacing(S32 spacing) { mSpacing = spacing; rearrange(); } +	S32					getPadding() const { return mPadding; } +	S32					getSpacing() const { return mSpacing; }  private:  	void				updatePanelVisiblilty(); @@ -77,7 +90,11 @@ private:  	/**  	 * Notify parent about size change, makes sense when used inside accordion  	 */ -	void				notifySizeChanged(S32 height); +	void				notifySizeChanged(); + +	bool				mIsHorizontal; +	S32					mPadding; +	S32					mSpacing;  	panel_list_t		mPanelList;  }; | 
