ManaPlus
Public Types | Public Member Functions | Private Types | Private Attributes | Static Private Attributes
StaticBrowserBox Class Reference

#include <staticbrowserbox.h>

Inheritance diagram for StaticBrowserBox:
Widget MouseListener Widget2

Public Types

typedef std::list< std::string > TextRows
 

Public Member Functions

 StaticBrowserBox (const Widget2 *const widget, const Opaque opaque, const std::string &skin)
 
 ~StaticBrowserBox ()
 
void setLinkHandler (LinkHandler *linkHandler)
 
void setOpaque (Opaque opaque)
 
void addSeparator (const std::string &row)
 
void addRow (const std::string &row, const bool atTop)
 
void addRow (const std::string &cmd, const char *const text)
 
void addImage (const std::string &path)
 
void clearRows ()
 
void mousePressed (MouseEvent &event)
 
void mouseMoved (MouseEvent &event)
 
void mouseExited (MouseEvent &event)
 
void draw (Graphics *const graphics)
 
void safeDraw (Graphics *const graphics)
 
void updateHeight ()
 
void updateSize ()
 
TextRowsgetRows ()
 
bool hasRows () const
 
void setProcessVars (const bool n)
 
void setEnableImages (const bool n)
 
void setEnableKeys (const bool n)
 
void setEnableTabs (const bool n)
 
std::string getTextAtPos (const int x, const int y) const
 
int getPadding () const
 
void setForegroundColorAll (const Color &color1, const Color &color2)
 
void moveSelectionUp ()
 
void moveSelectionDown ()
 
void selectSelection ()
 
- Public Member Functions inherited from Widget
 Widget (const Widget2 *const widget)
 
 ~Widget ()
 
virtual void drawFrame (Graphics *graphics)
 
virtual void safeDrawFrame (Graphics *graphics)
 
void setFrameSize (const unsigned int frameSize)
 
unsigned int getFrameSize () const
 
virtual void logic ()
 
WidgetgetParent () const
 
void setWidth (const int width)
 
int getWidth () const
 
void setHeight (const int height)
 
int getHeight () const
 
void setSize (const int width, const int height)
 
void setX (const int x)
 
int getX () const
 
void setY (const int y)
 
int getY () const
 
void setPosition (const int x, const int y)
 
void setDimension (const Rect &dimension)
 
const RectgetDimension () const
 
void setFocusable (const bool focusable)
 
bool isFocusable () const
 
virtual bool isFocused () const
 
void setEnabled (const bool enabled)
 
bool isEnabled () const
 
void setVisible (Visible visible)
 
bool isVisible () const
 
void setBaseColor (const Color &color)
 
const ColorgetBaseColor () const
 
void setForegroundColor (const Color &color)
 
const ColorgetForegroundColor () const
 
void setBackgroundColor (const Color &color)
 
const ColorgetBackgroundColor () const
 
virtual void requestFocus ()
 
virtual void requestMoveToTop ()
 
virtual void requestMoveToBottom ()
 
virtual void setFocusHandler (FocusHandler *const focusHandler)
 
FocusHandlergetFocusHandler ()
 
void addActionListener (ActionListener *const actionListener)
 
void removeActionListener (ActionListener *const actionListener)
 
void addDeathListener (WidgetDeathListener *const deathListener)
 
void removeDeathListener (WidgetDeathListener *const deathListener)
 
void addMouseListener (MouseListener *const mouseListener)
 
void removeMouseListener (MouseListener *const mouseListener)
 
void addKeyListener (KeyListener *const keyListener)
 
void removeKeyListener (KeyListener *const keyListener)
 
void addFocusListener (FocusListener *const focusListener)
 
void removeFocusListener (FocusListener *const focusListener)
 
void addWidgetListener (WidgetListener *const widgetListener)
 
void removeWidgetListener (WidgetListener *const widgetListener)
 
void setActionEventId (const std::string &actionEventId)
 
const std::string & getActionEventId () const
 
virtual void getAbsolutePosition (int &x, int &y) const
 
virtual void setParent (Widget *parent)
 
FontgetFont () const
 
void setFont (Font *const font)
 
virtual void fontChanged ()
 
bool isTabInEnabled () const
 
void setTabInEnabled (const bool enabled)
 
bool isTabOutEnabled () const
 
void setTabOutEnabled (const bool enabled)
 
void requestModalFocus ()
 
virtual void requestModalMouseInputFocus ()
 
virtual void releaseModalFocus ()
 
virtual void releaseModalMouseInputFocus ()
 
virtual bool isModalFocused () const
 
virtual bool isModalMouseInputFocused () const
 
virtual WidgetgetWidgetAt (int x, int y)
 
const std::list< MouseListener * > & getMouseListeners () const A_CONST
 
const std::list< KeyListener * > & getKeyListeners () const A_CONST
 
const std::list< FocusListener * > & getFocusListeners () const A_CONST
 
virtual Rect getChildrenArea ()
 
virtual FocusHandlergetInternalFocusHandler ()
 
void setInternalFocusHandler (FocusHandler *const internalFocusHandler)
 
virtual void moveToTop (Widget *widget)
 
virtual void moveToBottom (Widget *widget)
 
virtual void focusNext ()
 
virtual void focusPrevious ()
 
virtual void showWidgetPart (Widget *const widget, const Rect &area)
 
void setId (const std::string &id)
 
const std::string & getId () const
 
virtual void showPart (const Rect &rectangle)
 
bool isAllowLogic () const
 
void setMouseConsume (const bool b)
 
bool isMouseConsume () const
 
void setRedraw (const bool b)
 
virtual bool isSelectable () const
 
void setSelectable (const bool selectable)
 
void windowResized ()
 
virtual void postInit ()
 
- Public Member Functions inherited from Widget2
virtual ~Widget2 ()
 
const ColorgetThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE
 
const ColorgetThemeCharColor (const signed char c, bool &valid) const A_INLINE
 
virtual void setWidget2 (const Widget2 *const widget)
 
void setPalette (int palette)
 
void checkPalette ()
 
void setForegroundColor2 (const Color &color)
 
WidgetgetWindow () const
 
virtual void setWindow (Widget *const window)
 
- Public Member Functions inherited from MouseListener
virtual ~MouseListener ()
 
virtual void mouseEntered (MouseEvent &event)
 
virtual void mouseReleased (MouseEvent &event)
 
virtual void mouseClicked (MouseEvent &event)
 
virtual void mouseWheelMovedUp (MouseEvent &event)
 
virtual void mouseWheelMovedDown (MouseEvent &event)
 
virtual void mouseDragged (MouseEvent &event)
 

Private Types

typedef TextRows::iterator TextRowIterator
 
typedef TextRows::const_iterator TextRowCIter
 
typedef std::vector< LinePartLinePartList
 
typedef LinePartList::iterator LinePartIterator
 
typedef LinePartList::const_iterator LinePartCIter
 
typedef std::vector< BrowserLinkLinks
 
typedef Links::iterator LinkIterator
 

Private Attributes

TextRows mTextRows
 
std::list< int > mTextRowLinksCount
 
LinePartList mLineParts
 
Links mLinks
 
LinkHandlermLinkHandler
 
SkinmSkin
 
unsigned int mHighlightMode
 
int mSelectedLink
 
int mHeight
 
int mWidth
 
int mYStart
 
int mPadding
 
unsigned int mNewLinePadding
 
int mItemPadding
 
Color mHighlightColor
 
Color mHyperLinkColor
 
Color mColors [2][ColorName::COLORS_MAX]
 
Opaque mOpaque
 
bool mUseLinksAndUserColors
 
bool mUseEmotes
 
bool mProcessVars
 
bool mEnableImages
 
bool mEnableKeys
 
bool mEnableTabs
 
bool mSeparator
 

Static Private Attributes

static ImageSetmEmotes = 0
 
static int mInstances = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from Widget
static void setGlobalFont (Font *const font)
 
static FontgetGloablFont ()
 
static void cleanGlobalFont ()
 
static bool widgetExists (const Widget *const widget)
 
static void distributeWindowResizeEvent ()
 
static WidgetcallPostInit (Widget *const widget)
 
- Data Fields inherited from Widget
Visible mVisible
 
- Protected Types inherited from Widget
typedef std::list< MouseListener * > MouseListenerList
 
typedef MouseListenerList::iterator MouseListenerIterator
 
typedef std::list< KeyListener * > KeyListenerList
 
typedef KeyListenerList::iterator KeyListenerIterator
 
typedef std::list< ActionListener * > ActionListenerList
 
typedef ActionListenerList::iterator ActionListenerIterator
 
typedef std::list< WidgetDeathListener * > WidgetDeathListenerList
 
typedef WidgetDeathListenerList::iterator WidgetDeathListenerIterator
 
typedef std::list< FocusListener * > FocusListenerList
 
typedef FocusListenerList::iterator FocusListenerIterator
 
typedef std::list< WidgetListener * > WidgetListenerList
 
typedef WidgetListenerList::iterator WidgetListenerIterator
 
- Protected Member Functions inherited from Widget
void distributeActionEvent ()
 
void distributeResizedEvent ()
 
void distributeMovedEvent ()
 
void distributeHiddenEvent ()
 
void distributeShownEvent ()
 
- Protected Member Functions inherited from Widget2
 Widget2 (const Widget2 *const widget)
 
- Protected Member Functions inherited from MouseListener
 MouseListener ()
 
- Protected Attributes inherited from Widget
MouseListenerList mMouseListeners
 
KeyListenerList mKeyListeners
 
ActionListenerList mActionListeners
 
WidgetDeathListenerList mDeathListeners
 
FocusListenerList mFocusListeners
 
WidgetListenerList mWidgetListeners
 
Color mForegroundColor
 
Color mBackgroundColor
 
Color mBaseColor
 
Rect mDimension
 
std::string mActionEventId
 
std::string mId
 
FocusHandlermFocusHandler
 
FocusHandlermInternalFocusHandler
 
WidgetmParent
 
FontmCurrentFont
 
unsigned int mFrameSize
 
bool mFocusable
 
bool mTabIn
 
bool mTabOut
 
bool mEnabled
 
bool mAllowLogic
 
bool mMouseConsume
 
bool mRedraw
 
bool mSelectable
 
- Protected Attributes inherited from Widget2
int mPaletteOffset
 
WidgetmWindow
 
Color mForegroundColor2
 
- Static Protected Attributes inherited from Widget
static FontmGlobalFont = 0
 

Detailed Description

A simple browser box able to handle links and forward events to the parent conteiner.

Definition at line 47 of file staticbrowserbox.h.

Member Typedef Documentation

◆ LinePartCIter

typedef LinePartList::const_iterator StaticBrowserBox::LinePartCIter
private

Definition at line 160 of file staticbrowserbox.h.

◆ LinePartIterator

typedef LinePartList::iterator StaticBrowserBox::LinePartIterator
private

Definition at line 159 of file staticbrowserbox.h.

◆ LinePartList

typedef std::vector<LinePart> StaticBrowserBox::LinePartList
private

Definition at line 158 of file staticbrowserbox.h.

◆ LinkIterator

typedef Links::iterator StaticBrowserBox::LinkIterator
private

Definition at line 164 of file staticbrowserbox.h.

◆ Links

typedef std::vector<BrowserLink> StaticBrowserBox::Links
private

Definition at line 163 of file staticbrowserbox.h.

◆ TextRowCIter

typedef TextRows::const_iterator StaticBrowserBox::TextRowCIter
private

Definition at line 154 of file staticbrowserbox.h.

◆ TextRowIterator

typedef TextRows::iterator StaticBrowserBox::TextRowIterator
private

Definition at line 153 of file staticbrowserbox.h.

◆ TextRows

typedef std::list<std::string> StaticBrowserBox::TextRows

Definition at line 117 of file staticbrowserbox.h.

Constructor & Destructor Documentation

◆ StaticBrowserBox()

StaticBrowserBox::StaticBrowserBox ( const Widget2 *const  widget,
const Opaque  opaque,
const std::string &  skin 
)

Constructor.

Definition at line 61 of file staticbrowserbox.cpp.

63  :
64  Widget(widget),
65  MouseListener(),
66  mTextRows(),
68  mLineParts(),
69  mLinks(),
70  mLinkHandler(nullptr),
71  mSkin(nullptr),
72  mHighlightMode(0),
73  mSelectedLink(-1),
74  mHeight(0),
75  mWidth(0),
76  mYStart(0),
77  mPadding(0),
78  mNewLinePadding(15U),
79  mItemPadding(0),
80  mHighlightColor(getThemeColor(ThemeColorId::HIGHLIGHT, 255U)),
81  mHyperLinkColor(getThemeColor(ThemeColorId::HYPERLINK, 255U)),
82  mOpaque(opaque),
84  mUseEmotes(true),
85  mProcessVars(false),
86  mEnableImages(false),
87  mEnableKeys(false),
88  mEnableTabs(false),
89  mSeparator(false)
90 {
91  mAllowLogic = false;
92 
93  setFocusable(true);
94  addMouseListener(this);
95 
97 
98  if (theme != nullptr)
99  {
100  mSkin = theme->load(skin,
101  "browserbox.xml",
102  true,
104  }
105  if (mInstances == 0)
106  {
108  "graphics/sprites/chatemotes.png", 17, 18);
109  }
110  mInstances ++;
111 
112  if (mSkin != nullptr)
113  {
116  mSkin->getOption("newLinePadding", 15));
117  mItemPadding = mSkin->getOption("itemPadding");
118  if (mSkin->getOption("highlightBackground") != 0)
120  if (mSkin->getOption("highlightUnderline") != 0)
122  }
123 
124  readColor(BLACK);
125  readColor(RED);
126  readColor(GREEN);
127  readColor(BLUE);
128  readColor(ORANGE);
129  readColor(YELLOW);
130  readColor(PINK);
131  readColor(PURPLE);
132  readColor(GRAY);
133  readColor(BROWN);
134 
135  mForegroundColor = getThemeColor(ThemeColorId::BROWSERBOX, 255U);
136  mForegroundColor2 = getThemeColor(ThemeColorId::BROWSERBOX_OUTLINE, 255U);
137 }
#define CAST_U32
Definition: cast.h:31
int getOption(const std::string &name) const
Definition: skin.h:106
int getPadding() const
Definition: skin.h:100
std::list< int > mTextRowLinksCount
unsigned int mNewLinePadding
static ImageSet * mEmotes
unsigned int mHighlightMode
LinkHandler * mLinkHandler
LinePartList mLineParts
static std::string getThemePath()
Definition: theme.h:67
Skin * load(const std::string &filename, const std::string &filename2, const bool full, const std::string &defaultPath)
Definition: theme.cpp:179
Color mForegroundColor2
Definition: widget2.h:113
const Color & getThemeColor(const ThemeColorIdT type, const unsigned int alpha) const A_INLINE
Definition: widget2.h:45
Color mForegroundColor
Definition: widget.h:1086
void setFocusable(const bool focusable)
Definition: widget.cpp:192
Widget(const Widget2 *const widget)
Definition: widget.cpp:85
Color mBackgroundColor
Definition: widget.h:1091
bool mAllowLogic
Definition: widget.h:1160
void addMouseListener(MouseListener *const mouseListener)
Definition: widget.cpp:292
ImageSet * getImageSet(const std::string &imagePath, const int w, const int h)
Theme * theme
Definition: theme.cpp:62
static Color readColor(const std::string &description)
Definition: theme.cpp:697

References Widget::addMouseListener(), LinkHighlightMode::BACKGROUND, ColorName::BLACK, ColorName::BLUE, ColorName::BROWN, CAST_U32, Loader::getImageSet(), Skin::getOption(), Skin::getPadding(), Widget2::getThemeColor(), Theme::getThemePath(), ColorName::GRAY, ColorName::GREEN, Theme::load(), Widget::mAllowLogic, Widget::mBackgroundColor, mEmotes, Widget::mForegroundColor, Widget2::mForegroundColor2, mHighlightMode, mInstances, mItemPadding, mNewLinePadding, mPadding, mSkin, ColorName::ORANGE, ColorName::PINK, ColorName::PURPLE, readColor(), ColorName::RED, Widget::setFocusable(), theme, LinkHighlightMode::UNDERLINE, and ColorName::YELLOW.

◆ ~StaticBrowserBox()

StaticBrowserBox::~StaticBrowserBox ( )

Destructor.

Definition at line 139 of file staticbrowserbox.cpp.

140 {
141  if (gui != nullptr)
142  gui->removeDragged(this);
143 
144  if (theme != nullptr)
145  {
146  theme->unload(mSkin);
147  mSkin = nullptr;
148  }
149 
150  mInstances --;
151  if (mInstances == 0)
152  {
153  if (mEmotes != nullptr)
154  {
155  mEmotes->decRef();
156  mEmotes = nullptr;
157  }
158  }
159 }
void removeDragged(const Widget *const widget)
Definition: gui.cpp:1162
virtual void decRef()
Definition: resource.cpp:50
void unload(Skin *const skin)
Definition: theme.cpp:250
Gui * gui
Definition: gui.cpp:111

References Resource::decRef(), gui, mEmotes, mInstances, mSkin, Gui::removeDragged(), theme, and Theme::unload().

Member Function Documentation

◆ addImage()

void StaticBrowserBox::addImage ( const std::string &  path)

Definition at line 304 of file staticbrowserbox.cpp.

305 {
306  if (!mEnableImages)
307  return;
308 
309  mTextRows.push_back("~~~" + path);
310  mTextRowLinksCount.push_back(0);
311 }

References mEnableImages, mTextRowLinksCount, and mTextRows.

◆ addRow() [1/2]

void StaticBrowserBox::addRow ( const std::string &  cmd,
const char *const  text 
)

Adds a menu line to the browser.

Definition at line 296 of file staticbrowserbox.cpp.

298 {
299  addRow(strprintf("@@%s|%[email protected]@", encodeLinkText(cmd).c_str(),
300  encodeLinkText(text).c_str()),
301  false);
302 }
void addRow(const std::string &row, const bool atTop)
std::string strprintf(const char *const format,...)
std::string encodeLinkText(std::string data)

References addRow(), encodeLinkText(), and strprintf().

◆ addRow() [2/2]

void StaticBrowserBox::addRow ( const std::string &  row,
const bool  atTop 
)

Adds a text row to the browser.

Definition at line 174 of file staticbrowserbox.cpp.

176 {
177  std::string tmp = row;
178  std::string newRow;
179  size_t idx1;
180  const Font *const font = getFont();
181  int linksCount = 0;
182 
183  if (getWidth() < 0)
184  return;
185 
186  mSeparator = false;
187 
188  if (mProcessVars)
189  {
191  }
192 
193  // Use links and user defined colors
195  {
196  BrowserLink bLink;
197 
198  // Check for links in format "@@link|[email protected]@"
199  const uint32_t sz = CAST_U32(mTextRows.size());
200 
201  if (mEnableKeys)
202  {
204  }
205 
206  idx1 = tmp.find("@@");
207  while (idx1 != std::string::npos)
208  {
209  const size_t idx2 = tmp.find('|', idx1);
210  const size_t idx3 = tmp.find("@@", idx2);
211 
212  if (idx2 == std::string::npos || idx3 == std::string::npos)
213  break;
214  bLink.link = tmp.substr(idx1 + 2, idx2 - (idx1 + 2));
215  bLink.caption = tmp.substr(idx2 + 1, idx3 - (idx2 + 1));
216  bLink.y1 = CAST_S32(sz) * font->getHeight();
217  bLink.y2 = bLink.y1 + font->getHeight();
218  if (bLink.caption.empty())
219  {
221  bLink.link);
222  if (translator != nullptr)
223  bLink.caption = translator->getStr(bLink.caption);
224  }
225 
226  newRow.append(tmp.substr(0, idx1));
227 
228  std::string tmp2 = newRow;
229  idx1 = tmp2.find("##");
230  while (idx1 != std::string::npos)
231  {
232  tmp2.erase(idx1, 3);
233  idx1 = tmp2.find("##");
234  }
235  bLink.x1 = font->getWidth(tmp2) - 1;
236  bLink.x2 = bLink.x1 + font->getWidth(bLink.caption) + 1;
237 
238  if (atTop)
239  mLinks.insert(mLinks.begin(), bLink);
240  else
241  mLinks.push_back(bLink);
242  linksCount ++;
243 
244  newRow.append("##<").append(bLink.caption);
245 
246  tmp.erase(0, idx3 + 2);
247  if (!tmp.empty())
248  newRow.append("##>");
249 
250  idx1 = tmp.find("@@");
251  }
252 
253  newRow.append(tmp);
254  }
255  // Don't use links and user defined colors
256  else
257  {
258  newRow = row;
259  }
260 
261  if (mEnableTabs)
262  {
264  }
265 
266  if (atTop)
267  {
268  mTextRows.push_front(newRow);
269  mTextRowLinksCount.push_front(linksCount);
270  }
271  else
272  {
273  mTextRows.push_back(newRow);
274  mTextRowLinksCount.push_back(linksCount);
275  }
276 
277  std::string plain = STD_MOVE(newRow);
278  // workaround if used only one string started from bold
279  // width for this string can be calculated wrong
280  // this workaround fix width if string start from bold sign
281  const bool startBold = (plain.find("##B") == 0);
282  for (idx1 = plain.find("##");
283  idx1 != std::string::npos;
284  idx1 = plain.find("##"))
285  {
286  plain.erase(idx1, 3);
287  }
288 
289  // Adjust the StaticBrowserBox size. This need only for implementing "---"
290  const int w = startBold ?
291  boldFont->getWidth(plain) : font->getWidth(plain) + 2 * mPadding;
292  if (w > getWidth())
293  setWidth(w);
294 }
#define CAST_S32
Definition: cast.h:30
Definition: font.h:90
int getHeight() const
Definition: font.cpp:362
int getWidth(const std::string &text) const
Definition: font.cpp:334
const std::string getStr(const std::string &str)
Definition: podict.cpp:45
void setWidth(const int width)
Definition: widget.cpp:133
Font * getFont() const
Definition: widget.cpp:331
int getWidth() const
Definition: widget.h:221
Font * boldFont
Definition: gui.cpp:112
void replaceKeys(std::string &data)
void replaceVars(std::string &data)
std::string replaceLinkCommands(const std::string &link)
void replaceTabs(std::string &data)
PoDict * translator
Definition: podict.cpp:28
#define STD_MOVE(var)
Definition: stdmove.h:28

References boldFont, BrowserLink::caption, CAST_S32, CAST_U32, Widget::getFont(), Font::getHeight(), PoDict::getStr(), Widget::getWidth(), Font::getWidth(), BrowserLink::link, mEnableKeys, mEnableTabs, mLinks, mPadding, mProcessVars, mSeparator, mTextRowLinksCount, mTextRows, mUseLinksAndUserColors, BrowserBoxTools::replaceKeys(), BrowserBoxTools::replaceLinkCommands(), BrowserBoxTools::replaceTabs(), BrowserBoxTools::replaceVars(), Widget::setWidth(), STD_MOVE, translator, BrowserLink::x1, BrowserLink::x2, BrowserLink::y1, and BrowserLink::y2.

Referenced by PopupMenu::addBeingMenu(), PopupMenu::addBuySell(), PopupMenu::addBuySellDefault(), PopupMenu::addCatchPetCommands(), PopupMenu::addChat(), PopupMenu::addDrop(), PopupMenu::addFollow(), PopupMenu::addGmCommands(), PopupMenu::addItemMenu(), PopupMenu::addMailCommands(), PopupMenu::addNormalRelations(), PopupMenu::addParty(), PopupMenu::addPartyName(), PopupMenu::addPickupFilter(), PopupMenu::addPlayerMisc(), PopupMenu::addPlayerRelation(), PopupMenu::addProtection(), addRow(), addSeparator(), ServerInfoWindow::addServerComment(), PopupMenu::addSocialMenu(), ServerInfoWindow::addSourcesList(), PopupMenu::addUse(), PopupMenu::addWindowMenu(), Desktop::Desktop(), DidYouKnowWindow::loadFile(), HelpWindow::loadFile(), UpdaterWindow::loadFile(), UpdaterWindow::loadNews(), UpdaterWindow::loadPatch(), UpdaterWindow::logic(), HelpWindow::search(), SpeechBubble::setText(), PopupMenu::showAdoptCommands(), PopupMenu::showAttackMonsterPopup(), PopupMenu::showAttackPopup(), PopupMenu::showChangePos(), PopupMenu::showChatPopup(), PopupMenu::showCraftPopup(), PopupMenu::showDropPopup(), PopupMenu::showEmoteType(), PopupMenu::showFloorItemGMCommands(), PopupMenu::showFriendsPopup(), PopupMenu::showGMPopup(), PopupMenu::showGuildPopup(), PopupMenu::showItemGMCommands(), PopupMenu::showItemPopup(), PopupMenu::showLinkPopup(), PopupMenu::showMapPopup(), PopupMenu::showMonsterGMCommands(), PopupMenu::showMuteCommands(), PopupMenu::showNavigationPopup(), PopupMenu::showNpcDialogPopup(), PopupMenu::showNpcGMCommands(), PopupMenu::showOutfitsWindowPopup(), PopupMenu::showPartyPopup(), PopupMenu::showPickupItemPopup(), PopupMenu::showPickupPopup(), PopupMenu::showPlayerGMCommands(), PopupMenu::showPlayerMenu(), PopupMenu::showPlayerPopup(), PopupMenu::showPlayersPopup(), PopupMenu::showPopup(), ServerInfoWindow::showServerInfo(), PopupMenu::showSkillLevelPopup(), PopupMenu::showSkillOffsetPopup(), PopupMenu::showSkillPopup(), PopupMenu::showSkillTypePopup(), PopupMenu::showSpellPopup(), PopupMenu::showTextFieldPopup(), PopupMenu::showUndressPopup(), PopupMenu::showWindowPopup(), PopupMenu::showWindowsPopup(), and WhoIsOnline::updateWindow().

◆ addSeparator()

void StaticBrowserBox::addSeparator ( const std::string &  row)

◆ clearRows()

void StaticBrowserBox::clearRows ( )

◆ draw()

void StaticBrowserBox::draw ( Graphics *const  graphics)
virtual

Draws the browser box.

Implements Widget.

Definition at line 352 of file staticbrowserbox.cpp.

353 {
354  BLOCK_START("StaticBrowserBox::draw")
355  const ClipRect &cr = graphics->getTopClip();
356  mYStart = cr.y - cr.yOffset;
357  const int yEnd = mYStart + cr.height;
358  if (mYStart < 0)
359  mYStart = 0;
360 
361  if (mDimension.width != mWidth)
362  {
363  updateHeight();
364  reportAlways("browserbox resize in draw: %d, %d",
366  mWidth)
367  }
368 
369  if (mOpaque == Opaque_true)
370  {
371  graphics->setColor(mBackgroundColor);
372  graphics->fillRectangle(Rect(0, 0,
374  }
375 
376  if (mSelectedLink >= 0 &&
377  mSelectedLink < CAST_S32(mLinks.size()))
378  {
380  {
382  graphics->setColor(mHighlightColor);
383  graphics->fillRectangle(Rect(
384  link.x1,
385  link.y1,
386  link.x2 - link.x1,
387  link.y2 - link.y1));
388  }
389 
391  {
393  graphics->setColor(mHyperLinkColor);
394  graphics->drawLine(
395  link.x1,
396  link.y2,
397  link.x2,
398  link.y2);
399  }
400  }
401 
402  Font *const font = getFont();
403 
405  {
406  const LinePart &part = *i;
407  if (part.mY + 50 < mYStart)
408  continue;
409  if (part.mY > yEnd)
410  break;
411  if (part.mType == 0U)
412  {
413  if (part.mBold)
414  {
415  boldFont->drawString(graphics,
416  part.mColor,
417  part.mColor2,
418  part.mText,
419  part.mX, part.mY);
420  }
421  else
422  {
423  font->drawString(graphics,
424  part.mColor,
425  part.mColor2,
426  part.mText,
427  part.mX, part.mY);
428  }
429  }
430  else if (part.mImage != nullptr)
431  {
432  graphics->drawImage(part.mImage, part.mX, part.mY);
433  }
434  }
435 
436  BLOCK_END("StaticBrowserBox::draw")
437 }
#define CAST_SIZE
Definition: cast.h:34
#define reportAlways(...)
Definition: checkutils.h:253
void drawString(Graphics *const graphics, Color col, const Color &col2, const std::string &text, const int x, const int y)
Definition: font.cpp:254
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void fillRectangle(const Rect &rectangle)=0
virtual void setColor(const Color &color)
Definition: graphics.h:320
virtual void drawLine(int x1, int y1, int x2, int y2)=0
int mX
Definition: linepart.h:93
unsigned char mType
Definition: linepart.h:98
int mY
Definition: linepart.h:94
bool mBold
Definition: linepart.h:100
Color mColor
Definition: linepart.h:95
Image * mImage
Definition: linepart.h:99
Color mColor2
Definition: linepart.h:96
std::string mText
Definition: linepart.h:97
Definition: rect.h:74
int width
Definition: rect.h:219
int height
Definition: rect.h:224
LinePartList::const_iterator LinePartCIter
Rect mDimension
Definition: widget.h:1101
#define FOR_EACH(type, iter, array)
Definition: foreach.h:25
if(!vert) return
const bool Opaque_true
Definition: opaque.h:30
#define BLOCK_END(name)
Definition: perfomance.h:80
#define BLOCK_START(name)
Definition: perfomance.h:79

References LinkHighlightMode::BACKGROUND, BLOCK_END, BLOCK_START, boldFont, CAST_S32, CAST_SIZE, Graphics::drawImage(), Graphics::drawLine(), Font::drawString(), Graphics::fillRectangle(), FOR_EACH, Widget::getFont(), Graphics::getTopClip(), Rect::height, Widget::mBackgroundColor, LinePart::mBold, LinePart::mColor, LinePart::mColor2, Widget::mDimension, mHighlightColor, mHighlightMode, mHyperLinkColor, LinePart::mImage, mLineParts, mLinks, mOpaque, mSelectedLink, LinePart::mText, LinePart::mType, mWidth, LinePart::mX, LinePart::mY, mYStart, Opaque_true, reportAlways, Graphics::setColor(), LinkHighlightMode::UNDERLINE, updateHeight(), Rect::width, BrowserLink::x1, BrowserLink::x2, Rect::y, BrowserLink::y1, BrowserLink::y2, and ClipRect::yOffset.

Referenced by safeDraw().

◆ getPadding()

int StaticBrowserBox::getPadding ( ) const
inline

Definition at line 140 of file staticbrowserbox.h.

141  { return mPadding; }

References mPadding.

◆ getRows()

TextRows& StaticBrowserBox::getRows ( )
inline

Definition at line 119 of file staticbrowserbox.h.

120  { return mTextRows; }

References mTextRows.

◆ getTextAtPos()

std::string StaticBrowserBox::getTextAtPos ( const int  x,
const int  y 
) const

Definition at line 719 of file staticbrowserbox.cpp.

721 {
722  int textX = 0;
723  int textY = 0;
724 
725  getAbsolutePosition(textX, textY);
726  if (x < textX || y < textY)
727  return std::string();
728 
729  textY = y - textY;
730  std::string str;
731  int lastY = 0;
732 
734  {
735  const LinePart &part = *i;
736  if (part.mY + 50 < mYStart)
737  continue;
738  if (part.mY > textY)
739  break;
740 
741  if (part.mY > lastY)
742  {
743  str = part.mText;
744  lastY = part.mY;
745  }
746  else
747  {
748  str.append(part.mText);
749  }
750  }
751 
752  return str;
753 }
virtual void getAbsolutePosition(int &x, int &y) const
Definition: widget.cpp:312

References FOR_EACH, Widget::getAbsolutePosition(), mLineParts, LinePart::mText, LinePart::mY, mYStart, x, and y.

◆ hasRows()

bool StaticBrowserBox::hasRows ( ) const
inline

Definition at line 122 of file staticbrowserbox.h.

123  { return !mTextRows.empty(); }

References mTextRows.

◆ mouseExited()

void StaticBrowserBox::mouseExited ( MouseEvent event)
virtual

Called when the mouse has exited the widget area.

Parameters
eventDescribes the event.

Reimplemented from MouseListener.

Definition at line 347 of file staticbrowserbox.cpp.

348 {
349  mSelectedLink = -1;
350 }

References mSelectedLink.

◆ mouseMoved()

void StaticBrowserBox::mouseMoved ( MouseEvent event)
virtual

Called when the mouse has moved in the widget area and no mouse button has been pressed (i.e no widget is being dragged).

Parameters
eventDescribes the event.

Reimplemented from MouseListener.

Definition at line 338 of file staticbrowserbox.cpp.

339 {
340  const LinkIterator i = std::find_if(mLinks.begin(), mLinks.end(),
341  MouseOverLink(event.getX(), event.getY()));
342 
343  mSelectedLink = (i != mLinks.end())
344  ? CAST_S32(i - mLinks.begin()) : -1;
345 }
int getX() const
Definition: mouseevent.h:127
int getY() const
Definition: mouseevent.h:138
Links::iterator LinkIterator

References CAST_S32, MouseEvent::getX(), MouseEvent::getY(), mLinks, and mSelectedLink.

◆ mousePressed()

void StaticBrowserBox::mousePressed ( MouseEvent event)
virtual

Handles mouse actions.

Reimplemented from MouseListener.

Definition at line 323 of file staticbrowserbox.cpp.

324 {
325  if (mLinkHandler == nullptr)
326  return;
327 
328  const LinkIterator i = std::find_if(mLinks.begin(), mLinks.end(),
329  MouseOverLink(event.getX(), event.getY()));
330 
331  if (i != mLinks.end())
332  {
333  mLinkHandler->handleLink(i->link, &event);
334  event.consume();
335  }
336 }
virtual void handleLink(const std::string &link, MouseEvent *event)=0

References MouseEvent::getX(), MouseEvent::getY(), LinkHandler::handleLink(), mLinkHandler, and mLinks.

◆ moveSelectionDown()

void StaticBrowserBox::moveSelectionDown ( )

Definition at line 770 of file staticbrowserbox.cpp.

771 {
772  mSelectedLink ++;
773  if (mSelectedLink >= static_cast<signed int>(mLinks.size()))
774  mSelectedLink = 0;
775 }

References mLinks, and mSelectedLink.

Referenced by PopupMenu::moveDown().

◆ moveSelectionUp()

void StaticBrowserBox::moveSelectionUp ( )

Definition at line 762 of file staticbrowserbox.cpp.

763 {
764  if (mSelectedLink <= 0)
765  mSelectedLink = CAST_S32(mLinks.size()) - 1;
766  else
767  mSelectedLink --;
768 }

References CAST_S32, mLinks, and mSelectedLink.

Referenced by PopupMenu::moveUp().

◆ safeDraw()

void StaticBrowserBox::safeDraw ( Graphics *const  graphics)
virtual

Implements Widget.

Definition at line 439 of file staticbrowserbox.cpp.

440 {
441  StaticBrowserBox::draw(graphics);
442 }
void draw(Graphics *const graphics)

References draw().

◆ selectSelection()

void StaticBrowserBox::selectSelection ( )

Definition at line 777 of file staticbrowserbox.cpp.

778 {
779  if ((mLinkHandler == nullptr) ||
780  mSelectedLink < 0 ||
781  mSelectedLink >= static_cast<signed int>(mLinks.size()))
782  {
783  return;
784  }
785 
787  nullptr);
788 }

References CAST_SIZE, LinkHandler::handleLink(), mLinkHandler, mLinks, and mSelectedLink.

Referenced by PopupMenu::select().

◆ setEnableImages()

void StaticBrowserBox::setEnableImages ( const bool  n)
inline

◆ setEnableKeys()

void StaticBrowserBox::setEnableKeys ( const bool  n)
inline

◆ setEnableTabs()

void StaticBrowserBox::setEnableTabs ( const bool  n)
inline

◆ setForegroundColorAll()

void StaticBrowserBox::setForegroundColorAll ( const Color color1,
const Color color2 
)

Definition at line 755 of file staticbrowserbox.cpp.

757 {
758  mForegroundColor = color1;
759  mForegroundColor2 = color2;
760 }

References Widget::mForegroundColor, and Widget2::mForegroundColor2.

Referenced by SpeechBubble::setText(), and SpeechBubble::SpeechBubble().

◆ setLinkHandler()

void StaticBrowserBox::setLinkHandler ( LinkHandler linkHandler)

◆ setOpaque()

void StaticBrowserBox::setOpaque ( Opaque  opaque)
inline

◆ setProcessVars()

void StaticBrowserBox::setProcessVars ( const bool  n)
inline

◆ updateHeight()

void StaticBrowserBox::updateHeight ( )

Definition at line 444 of file staticbrowserbox.cpp.

445 {
446  unsigned int y = CAST_U32(mPadding);
447  int moreHeight = 0;
448  int link = 0;
449  bool bold = false;
450  const unsigned int wWidth = CAST_U32(mDimension.width - mPadding);
451  const Font *const font = getFont();
452  const int fontHeight = font->getHeight() + 2 * mItemPadding;
453  const int fontWidthMinus = font->getWidth("-");
454 
455  Color selColor[2] = {mForegroundColor, mForegroundColor2};
456  const Color textColor[2] = {mForegroundColor, mForegroundColor2};
457  mLineParts.clear();
458  uint32_t dataWidth = 0;
459 
460  if (mSeparator)
461  {
462  mSeparator = false;
463  mTextRows.pop_back();
464  }
465 
467  {
468  unsigned int x = CAST_U32(mPadding);
469  const std::string row = *(i);
470  int objects = 0;
471 
472  // Check for separator lines
473  if (row.find("---", 0) == 0)
474  {
475  const int dashWidth = fontWidthMinus;
476  for (x = CAST_U32(mPadding); x < wWidth; x ++)
477  {
478  mLineParts.push_back(LinePart(CAST_S32(x),
480  selColor[0], selColor[1], "-", false));
481  x += CAST_U32(CAST_S32(
482  dashWidth) - 2);
483  }
484 
485  y += CAST_U32(fontHeight);
486  continue;
487  }
488  else if (mEnableImages && row.find("~~~", 0) == 0)
489  {
490  std::string str = row.substr(3);
491  const size_t sz = str.size();
492  if (sz > 2 && str.substr(sz - 1) == "~")
493  str = str.substr(0, sz - 1);
494  Image *const img = Loader::getImage(str);
495  if (img != nullptr)
496  {
497  img->incRef();
498  mLineParts.push_back(LinePart(CAST_S32(x),
500  selColor[0], selColor[1], img));
501  y += CAST_U32(img->getHeight() + 2);
502  moreHeight += img->getHeight();
503  if (img->getWidth() + mPadding + 2 > CAST_S32(dataWidth))
504  dataWidth = img->getWidth() + 2 + mPadding;
505  }
506  continue;
507  }
508 
509  Color prevColor[2];
510  prevColor[0] = selColor[0];
511  prevColor[1] = selColor[1];
512  bold = false;
513 
514  for (size_t start = 0, end = std::string::npos;
515  start != std::string::npos;
516  start = end, end = std::string::npos)
517  {
518  size_t idx1 = end;
519  size_t idx2 = end;
520 
521  // "Tokenize" the string at control sequences
523  idx1 = row.find("##", start + 1);
524  if (start == 0 || mUseLinksAndUserColors)
525  {
526  // Check for color change in format "##x", x = [L,P,0..9]
527  if (row.find("##", start) == start && row.size() > start + 2)
528  {
529  const signed char c = row.at(start + 2);
530 
531  bool valid(false);
532  const Color col[2] =
533  {
536  c | 0x80), valid)
537  };
538 
539  if (c == '>')
540  {
541  selColor[0] = prevColor[0];
542  selColor[1] = prevColor[1];
543  }
544  else if (c == '<')
545  {
546  prevColor[0] = selColor[0];
547  prevColor[1] = selColor[1];
548  selColor[0] = col[0];
549  selColor[1] = col[1];
550  }
551  else if (c == 'B')
552  {
553  bold = true;
554  }
555  else if (c == 'b')
556  {
557  bold = false;
558  }
559  else if (valid)
560  {
561  selColor[0] = col[0];
562  selColor[1] = col[1];
563  }
564  else
565  {
566  switch (c)
567  {
568  case '0':
569  selColor[0] = mColors[0][ColorName::BLACK];
570  selColor[1] = mColors[1][ColorName::BLACK];
571  break;
572  case '1':
573  selColor[0] = mColors[0][ColorName::RED];
574  selColor[1] = mColors[1][ColorName::RED];
575  break;
576  case '2':
577  selColor[0] = mColors[0][ColorName::GREEN];
578  selColor[1] = mColors[1][ColorName::GREEN];
579  break;
580  case '3':
581  selColor[0] = mColors[0][ColorName::BLUE];
582  selColor[1] = mColors[1][ColorName::BLUE];
583  break;
584  case '4':
585  selColor[0] = mColors[0][ColorName::ORANGE];
586  selColor[1] = mColors[1][ColorName::ORANGE];
587  break;
588  case '5':
589  selColor[0] = mColors[0][ColorName::YELLOW];
590  selColor[1] = mColors[1][ColorName::YELLOW];
591  break;
592  case '6':
593  selColor[0] = mColors[0][ColorName::PINK];
594  selColor[1] = mColors[1][ColorName::PINK];
595  break;
596  case '7':
597  selColor[0] = mColors[0][ColorName::PURPLE];
598  selColor[1] = mColors[1][ColorName::PURPLE];
599  break;
600  case '8':
601  selColor[0] = mColors[0][ColorName::GRAY];
602  selColor[1] = mColors[1][ColorName::GRAY];
603  break;
604  case '9':
605  selColor[0] = mColors[0][ColorName::BROWN];
606  selColor[1] = mColors[1][ColorName::BROWN];
607  break;
608  default:
609  selColor[0] = textColor[0];
610  selColor[1] = textColor[1];
611  break;
612  }
613  }
614 
615  if (c == '<' && link < CAST_S32(mLinks.size()))
616  {
617  int size;
618  if (bold)
619  {
621  mLinks[CAST_SIZE(link)].caption) + 1;
622  }
623  else
624  {
625  size = font->getWidth(
626  mLinks[CAST_SIZE(link)].caption) + 1;
627  }
628 
629  BrowserLink &linkRef = mLinks[CAST_SIZE(
630  link)];
631  linkRef.x1 = CAST_S32(x);
632  linkRef.y1 = CAST_S32(y);
633  linkRef.x2 = linkRef.x1 + size;
634  linkRef.y2 = CAST_S32(y) + fontHeight - 1;
635  link++;
636  }
637 
638  start += 3;
639  if (start == row.size())
640  break;
641  }
642  }
643  if (mUseEmotes)
644  idx2 = row.find("%%", start + 1);
645  if (idx1 < idx2)
646  end = idx1;
647  else
648  end = idx2;
649  if (mUseEmotes)
650  {
651  // check for emote icons
652  if (row.size() > start + 2 && row.substr(start, 2) == "%%")
653  {
654  if (objects < 5)
655  {
656  const int cid = row.at(start + 2) - '0';
657  if (cid >= 0)
658  {
659  if (mEmotes != nullptr)
660  {
661  const size_t sz = mEmotes->size();
662  if (CAST_SIZE(cid) < sz)
663  {
664  Image *const img = mEmotes->get(
665  CAST_SIZE(cid));
666  if (img != nullptr)
667  {
668  mLineParts.push_back(LinePart(
669  CAST_S32(x),
671  selColor[0], selColor[1], img));
672  x += 18;
673  }
674  }
675  }
676  }
677  objects ++;
678  }
679 
680  start += 3;
681  if (start == row.size())
682  {
683  if (x > dataWidth)
684  dataWidth = x;
685  break;
686  }
687  }
688  }
689  const size_t len = (end == std::string::npos) ? end : end - start;
690 
691  if (start >= row.length())
692  break;
693 
694  std::string part = row.substr(start, len);
695 
696  mLineParts.push_back(LinePart(CAST_S32(x),
698  selColor[0], selColor[1], part.c_str(), bold));
699 
700  int width = 0;
701  if (bold)
702  width = boldFont->getWidth(part);
703  else
704  width = font->getWidth(part);
705 
706  x += CAST_U32(width);
707  if (x > dataWidth)
708  dataWidth = x;
709  }
710  y += CAST_U32(fontHeight);
711  }
712  mWidth = dataWidth + mPadding;
713  mHeight = CAST_S32(mTextRows.size())
714  * fontHeight + moreHeight + 2 * mPadding;
715  setSize(mWidth,
716  mHeight);
717 }
#define CAST_S8
Definition: cast.h:26
Definition: color.h:76
Image * get(const size_type i) const
Definition: imageset.cpp:67
size_type size() const
Definition: imageset.h:73
Color mColors[2][ColorName::COLORS_MAX]
TextRows::const_iterator TextRowCIter
const Color & getThemeCharColor(const signed char c, bool &valid) const A_INLINE
Definition: widget2.h:52
void setSize(const int width, const int height)
Definition: widget.cpp:367
int size()
Definition: emotedb.cpp:306
Image * getImage(const std::string &idPath)
Definition: imageloader.cpp:86

References ColorName::BLACK, ColorName::BLUE, boldFont, ColorName::BROWN, CAST_S32, CAST_S8, CAST_SIZE, CAST_U32, FOR_EACH, ImageSet::get(), Widget::getFont(), Font::getHeight(), Loader::getImage(), Widget2::getThemeCharColor(), Font::getWidth(), ColorName::GRAY, ColorName::GREEN, mColors, Widget::mDimension, mEmotes, mEnableImages, Widget::mForegroundColor, Widget2::mForegroundColor2, mHeight, mItemPadding, mLineParts, mLinks, mPadding, mSeparator, mTextRows, mUseEmotes, mUseLinksAndUserColors, mWidth, ColorName::ORANGE, ColorName::PINK, ColorName::PURPLE, ColorName::RED, Widget::setSize(), EmoteDB::size(), ImageSet::size(), anonymous_namespace{stringutils.cpp}::start, anonymous_namespace{libxml.cpp}::valid, Rect::width, x, BrowserLink::x1, BrowserLink::x2, y, BrowserLink::y1, BrowserLink::y2, and ColorName::YELLOW.

Referenced by Desktop::Desktop(), draw(), DidYouKnowWindow::loadData(), UpdaterWindow::loadFile(), HelpWindow::loadHelp(), HelpWindow::loadHelpSimple(), UpdaterWindow::loadNews(), UpdaterWindow::loadPatch(), WhoIsOnline::loadWebList(), UpdaterWindow::logic(), HelpWindow::search(), SpeechBubble::setText(), PopupMenu::showPopup(), ServerInfoWindow::showServerInfo(), WhoIsOnline::updateWindow(), and Desktop::widgetResized().

◆ updateSize()

void StaticBrowserBox::updateSize ( )

Field Documentation

◆ mColors

Color StaticBrowserBox::mColors[2][ColorName::COLORS_MAX]
private

Definition at line 180 of file staticbrowserbox.h.

Referenced by updateHeight().

◆ mEmotes

ImageSet * StaticBrowserBox::mEmotes = 0
staticprivate

Definition at line 191 of file staticbrowserbox.h.

Referenced by StaticBrowserBox(), updateHeight(), and ~StaticBrowserBox().

◆ mEnableImages

bool StaticBrowserBox::mEnableImages
private

Definition at line 186 of file staticbrowserbox.h.

Referenced by addImage(), setEnableImages(), and updateHeight().

◆ mEnableKeys

bool StaticBrowserBox::mEnableKeys
private

Definition at line 187 of file staticbrowserbox.h.

Referenced by addRow(), and setEnableKeys().

◆ mEnableTabs

bool StaticBrowserBox::mEnableTabs
private

Definition at line 188 of file staticbrowserbox.h.

Referenced by addRow(), and setEnableTabs().

◆ mHeight

int StaticBrowserBox::mHeight
private

Definition at line 171 of file staticbrowserbox.h.

Referenced by updateHeight().

◆ mHighlightColor

Color StaticBrowserBox::mHighlightColor
private

Definition at line 178 of file staticbrowserbox.h.

Referenced by draw().

◆ mHighlightMode

unsigned int StaticBrowserBox::mHighlightMode
private

Definition at line 169 of file staticbrowserbox.h.

Referenced by draw(), and StaticBrowserBox().

◆ mHyperLinkColor

Color StaticBrowserBox::mHyperLinkColor
private

Definition at line 179 of file staticbrowserbox.h.

Referenced by draw().

◆ mInstances

int StaticBrowserBox::mInstances = 0
staticprivate

Definition at line 192 of file staticbrowserbox.h.

Referenced by StaticBrowserBox(), and ~StaticBrowserBox().

◆ mItemPadding

int StaticBrowserBox::mItemPadding
private

Definition at line 176 of file staticbrowserbox.h.

Referenced by StaticBrowserBox(), and updateHeight().

◆ mLineParts

LinePartList StaticBrowserBox::mLineParts
private

Definition at line 161 of file staticbrowserbox.h.

Referenced by draw(), getTextAtPos(), and updateHeight().

◆ mLinkHandler

LinkHandler* StaticBrowserBox::mLinkHandler
private

Definition at line 167 of file staticbrowserbox.h.

Referenced by mousePressed(), selectSelection(), and setLinkHandler().

◆ mLinks

Links StaticBrowserBox::mLinks
private

◆ mNewLinePadding

unsigned int StaticBrowserBox::mNewLinePadding
private

Definition at line 175 of file staticbrowserbox.h.

Referenced by StaticBrowserBox().

◆ mOpaque

Opaque StaticBrowserBox::mOpaque
private

Definition at line 182 of file staticbrowserbox.h.

Referenced by draw(), and setOpaque().

◆ mPadding

int StaticBrowserBox::mPadding
private

Definition at line 174 of file staticbrowserbox.h.

Referenced by addRow(), getPadding(), StaticBrowserBox(), and updateHeight().

◆ mProcessVars

bool StaticBrowserBox::mProcessVars
private

Definition at line 185 of file staticbrowserbox.h.

Referenced by addRow(), and setProcessVars().

◆ mSelectedLink

int StaticBrowserBox::mSelectedLink
private

◆ mSeparator

bool StaticBrowserBox::mSeparator
private

Definition at line 189 of file staticbrowserbox.h.

Referenced by addRow(), addSeparator(), and updateHeight().

◆ mSkin

Skin* StaticBrowserBox::mSkin
private

Definition at line 168 of file staticbrowserbox.h.

Referenced by StaticBrowserBox(), and ~StaticBrowserBox().

◆ mTextRowLinksCount

std::list<int> StaticBrowserBox::mTextRowLinksCount
private

Definition at line 156 of file staticbrowserbox.h.

Referenced by addImage(), addRow(), and clearRows().

◆ mTextRows

TextRows StaticBrowserBox::mTextRows
private

Definition at line 155 of file staticbrowserbox.h.

Referenced by addImage(), addRow(), clearRows(), getRows(), hasRows(), and updateHeight().

◆ mUseEmotes

bool StaticBrowserBox::mUseEmotes
private

Definition at line 184 of file staticbrowserbox.h.

Referenced by updateHeight().

◆ mUseLinksAndUserColors

bool StaticBrowserBox::mUseLinksAndUserColors
private

Definition at line 183 of file staticbrowserbox.h.

Referenced by addRow(), and updateHeight().

◆ mWidth

int StaticBrowserBox::mWidth
private

Definition at line 172 of file staticbrowserbox.h.

Referenced by draw(), and updateHeight().

◆ mYStart

int StaticBrowserBox::mYStart
private

Definition at line 173 of file staticbrowserbox.h.

Referenced by draw(), and getTextAtPos().


The documentation for this class was generated from the following files: