summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-03 18:59:37 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-03 19:03:30 +0300
commit98db78be9552b039090ce5dfc53803df2dd54b41 (patch)
treeefda1a43723e8e11e075dcfef2776fe38c7cb3da /src/gui/widgets
parentd7cbb663f5f8e19ccfa7162ef7d1d4e3b4020335 (diff)
downloadmanaplus-98db78be9552b039090ce5dfc53803df2dd54b41.tar.gz
manaplus-98db78be9552b039090ce5dfc53803df2dd54b41.tar.bz2
manaplus-98db78be9552b039090ce5dfc53803df2dd54b41.tar.xz
manaplus-98db78be9552b039090ce5dfc53803df2dd54b41.zip
Add some missing getters.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/button.h6
-rw-r--r--src/gui/widgets/channeltab.h3
-rw-r--r--src/gui/widgets/chattab.h8
-rw-r--r--src/gui/widgets/guildchattab.h3
-rw-r--r--src/gui/widgets/icon.h3
-rw-r--r--src/gui/widgets/layout.h4
-rw-r--r--src/gui/widgets/popup.h18
-rw-r--r--src/gui/widgets/progressbar.h6
-rw-r--r--src/gui/widgets/scrollarea.h3
-rw-r--r--src/gui/widgets/setupitem.h4
-rw-r--r--src/gui/widgets/setuptabscroll.h2
-rw-r--r--src/gui/widgets/shoplistbox.h3
-rw-r--r--src/gui/widgets/tab.h4
-rw-r--r--src/gui/widgets/tabbedarea.h4
15 files changed, 43 insertions, 30 deletions
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index ab3049c0b..d82ebd758 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -187,7 +187,7 @@ class BrowserBox : public gcn::Widget,
TextRows &getRows()
{ return mTextRows; }
- bool hasRows()
+ bool hasRows() const
{ return !mTextRows.empty(); }
void setAlwaysUpdate(bool n)
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index aed46bb55..560e46377 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -70,16 +70,16 @@ class Button : public gcn::Button, public gcn::WidgetListener
void setDescription(std::string text)
{ mDescription = text; }
- std::string getDescription()
+ std::string getDescription() const
{ return mDescription; }
- unsigned getClickCount()
+ unsigned getClickCount() const
{ return mClickCount; }
void setTag(int tag)
{ mTag = tag; }
- int getTag()
+ int getTag() const
{ return mTag; }
void widgetResized(const gcn::Event &event);
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index 4b56d2e05..39702a696 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -34,7 +34,8 @@ class ChannelTab : public ChatTab
{
public:
- Channel *getChannel() const { return mChannel; }
+ Channel *getChannel() const
+ { return mChannel; }
void showHelp();
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index ddf10bf5e..912305a63 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -137,24 +137,24 @@ class ChatTab : public Tab
std::list<std::string> &getRows()
{ return mTextOutput->getRows(); }
- bool hasRows()
+ bool hasRows() const
{ return mTextOutput->hasRows(); }
void loadFromLogFile(std::string name);
- bool getAllowHighlight()
+ bool getAllowHighlight() const
{ return mAllowHightlight; }
void setAllowHighlight(bool n)
{ mAllowHightlight = n; }
- bool getRemoveNames()
+ bool getRemoveNames() const
{ return mRemoveNames; }
void setRemoveNames(bool n)
{ mRemoveNames = n; }
- bool getNoAway()
+ bool getNoAway() const
{ return mNoAway; }
void setNoAway(bool n)
diff --git a/src/gui/widgets/guildchattab.h b/src/gui/widgets/guildchattab.h
index bebdaa1f3..be6f4d034 100644
--- a/src/gui/widgets/guildchattab.h
+++ b/src/gui/widgets/guildchattab.h
@@ -41,7 +41,8 @@ class GuildChatTab : public ChatTab
void saveToLogFile(std::string &msg);
- int getType() const { return ChatTab::TAB_GUILD; }
+ int getType() const
+ { return ChatTab::TAB_GUILD; }
protected:
void handleInput(const std::string &msg);
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 6f05da3f7..98fee314a 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -48,7 +48,8 @@ class Icon : public gcn::Widget
/**
* Gets the current Image.
*/
- Image *getImage() const { return mImage; }
+ Image *getImage() const
+ { return mImage; }
/**
* Sets the image to display.
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index 02fed43b5..046d09b59 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -266,10 +266,10 @@ class LayoutCell
void setType(int t)
{ mType = t; }
- int getWidth()
+ int getWidth() const
{ return mExtent[0]; }
- int getHeight()
+ int getHeight() const
{ return mExtent[1]; }
void setWidth(int w)
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index 8ff21149a..5572abd03 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -94,28 +94,32 @@ class Popup : public Container, public gcn::MouseListener,
*/
void setMinWidth(int width);
- int getMinWidth() const { return mMinWidth; }
+ int getMinWidth() const
+ { return mMinWidth; }
/**
* Sets the minimum height of the popup.
*/
void setMinHeight(int height);
- int getMinHeight() const { return mMinHeight; }
+ int getMinHeight() const
+ { return mMinHeight; }
/**
* Sets the maximum width of the popup.
*/
void setMaxWidth(int width);
- int getMaxWidth() const { return mMaxWidth; }
+ int getMaxWidth() const
+ { return mMaxWidth; }
/**
* Sets the minimum height of the popup.
*/
void setMaxHeight(int height);
- int getMaxHeight() const { return mMaxHeight; }
+ int getMaxHeight() const
+ { return mMaxHeight; }
/**
* Gets the padding of the popup. The padding is the distance between
@@ -124,9 +128,11 @@ class Popup : public Container, public gcn::MouseListener,
* @return The padding of the popup.
* @see setPadding
*/
- int getPadding() const { return mPadding; }
+ int getPadding() const
+ { return mPadding; }
- void setPadding(int padding) { mPadding = padding; }
+ void setPadding(int padding)
+ { mPadding = padding; }
/**
* Sets the name of the popup. This is only useful for debug purposes.
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 163310245..603df6157 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -73,7 +73,8 @@ class ProgressBar : public gcn::Widget, public gcn::WidgetListener
/**
* Returns the current progress.
*/
- float getProgress() const { return mProgress; }
+ float getProgress() const
+ { return mProgress; }
/**
* Change the ProgressPalette for this ProgressBar to follow or -1 to
@@ -89,7 +90,8 @@ class ProgressBar : public gcn::Widget, public gcn::WidgetListener
/**
* Returns the color of the progress bar.
*/
- const gcn::Color &getColor() const { return mColor; }
+ const gcn::Color &getColor() const
+ { return mColor; }
/**
* Sets the text shown on the progress bar.
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 86902b5c9..582033071 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -89,7 +89,8 @@ class ScrollArea : public gcn::ScrollArea, public gcn::WidgetListener
/**
* Returns whether the widget draws its background or not.
*/
- bool isOpaque() const { return mOpaque; }
+ bool isOpaque() const
+ { return mOpaque; }
/**
* Called when the mouse moves in the widget area.
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index eb2680ede..71856d6e2 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -75,7 +75,7 @@ class SetupItem : public gcn::ActionListener
void setWidget(gcn::Widget *widget)
{ mWidget = widget; }
- gcn::Widget *getWidget()
+ gcn::Widget *getWidget() const
{ return mWidget; }
Configuration *getConfig();
@@ -93,7 +93,7 @@ class SetupItem : public gcn::ActionListener
virtual void externalUpdated(std::string eventName);
// virtual int add(ContainerPlacer &place, int x, int y, int width);
- bool isMainConfig()
+ bool isMainConfig() const
{ return mMainConfig; }
protected:
diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h
index 4ad1f464b..d471ecfbc 100644
--- a/src/gui/widgets/setuptabscroll.h
+++ b/src/gui/widgets/setuptabscroll.h
@@ -43,7 +43,7 @@ class SetupTabScroll : public SetupTab
void addControl(SetupItem *widget, std::string event);
- VertContainer *getContainer()
+ VertContainer *getContainer() const
{ return mContainer; }
virtual void apply();
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index 9b416d3a3..694fdb92e 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -56,7 +56,8 @@ class ShopListBox : public ListBox
/**
* Returns the height of a row.
*/
- unsigned int getRowHeight() const { return mRowHeight; }
+ unsigned int getRowHeight() const
+ { return mRowHeight; }
/**
* gives information about the current player's money
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index 40b46ede5..829689543 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -61,7 +61,7 @@ class Tab : public gcn::Tab, public gcn::WidgetListener
*/
void setFlash(int flash);
- int getFlash()
+ int getFlash() const
{ return mFlash; }
void widgetResized(const gcn::Event &event);
@@ -70,7 +70,7 @@ class Tab : public gcn::Tab, public gcn::WidgetListener
void setLabelFont(gcn::Font *font);
- gcn::Label *getLabel()
+ gcn::Label *getLabel() const
{ return mLabel; }
protected:
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index b202dfc9d..cceaf56b7 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -136,13 +136,13 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
void setRightMargin(int n)
{ mRightMargin = n; }
- int getRightMargin()
+ int getRightMargin() const
{ return mRightMargin; }
void setFollowDownScroll(bool n)
{ mFollowDownScroll = n; }
- bool getFollowDownScroll()
+ bool getFollowDownScroll() const
{ return mFollowDownScroll; }
void fixSize()