summaryrefslogtreecommitdiff
path: root/src/guichan/include
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-15 04:22:11 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-15 04:22:11 +0300
commitc91bc5201596eda73f9df2222d76d9f413426a85 (patch)
treecbdcf7fb76eee35baf7265e5c04da2f13633ab5d /src/guichan/include
parent255b1c29f47ef3b1e7a9b058c56ef72bfa10c5e3 (diff)
downloadmanaverse-c91bc5201596eda73f9df2222d76d9f413426a85.tar.gz
manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.tar.bz2
manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.tar.xz
manaverse-c91bc5201596eda73f9df2222d76d9f413426a85.zip
Remove some diplicated code from embeded guichan.
Diffstat (limited to 'src/guichan/include')
-rw-r--r--src/guichan/include/guichan/widgets/button.hpp8
-rw-r--r--src/guichan/include/guichan/widgets/checkbox.hpp14
-rw-r--r--src/guichan/include/guichan/widgets/dropdown.hpp6
-rw-r--r--src/guichan/include/guichan/widgets/radiobutton.hpp7
-rw-r--r--src/guichan/include/guichan/widgets/slider.hpp12
-rw-r--r--src/guichan/include/guichan/widgets/tab.hpp3
-rw-r--r--src/guichan/include/guichan/widgets/tabbedarea.hpp18
-rw-r--r--src/guichan/include/guichan/widgets/textfield.hpp8
-rw-r--r--src/guichan/include/guichan/widgets/window.hpp7
9 files changed, 4 insertions, 79 deletions
diff --git a/src/guichan/include/guichan/widgets/button.hpp b/src/guichan/include/guichan/widgets/button.hpp
index c0d0a237d..e3b8b98de 100644
--- a/src/guichan/include/guichan/widgets/button.hpp
+++ b/src/guichan/include/guichan/widgets/button.hpp
@@ -147,22 +147,14 @@ namespace gcn
void adjustSize();
- //Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
-
// Inherited from FocusListener
virtual void focusLost(const Event& event);
-
// Inherited from MouseListener
virtual void mousePressed(MouseEvent& mouseEvent);
- virtual void mouseReleased(MouseEvent& mouseEvent);
-
virtual void mouseEntered(MouseEvent& mouseEvent);
virtual void mouseExited(MouseEvent& mouseEvent);
diff --git a/src/guichan/include/guichan/widgets/checkbox.hpp b/src/guichan/include/guichan/widgets/checkbox.hpp
index ad43e2896..0ff328d72 100644
--- a/src/guichan/include/guichan/widgets/checkbox.hpp
+++ b/src/guichan/include/guichan/widgets/checkbox.hpp
@@ -126,17 +126,10 @@ namespace gcn
*/
void adjustSize();
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
-
// Inherited from KeyListener
virtual void keyPressed(KeyEvent& keyEvent);
-
// Inherited from MouseListener
virtual void mouseClicked(MouseEvent& mouseEvent);
@@ -146,13 +139,6 @@ namespace gcn
protected:
/**
- * Draws the box of the check box.
- *
- * @param graphics A Graphics object to draw with.
- */
- virtual void drawBox(Graphics *graphics);
-
- /**
* Toggles the check box between being selected and
* not being selected.
*/
diff --git a/src/guichan/include/guichan/widgets/dropdown.hpp b/src/guichan/include/guichan/widgets/dropdown.hpp
index c096bb03f..600558d67 100644
--- a/src/guichan/include/guichan/widgets/dropdown.hpp
+++ b/src/guichan/include/guichan/widgets/dropdown.hpp
@@ -171,8 +171,6 @@ namespace gcn
// Inherited from Widget
- virtual void draw(Graphics* graphics);
-
void setBaseColor(const Color& color);
void setBackgroundColor(const Color& color);
@@ -206,7 +204,7 @@ namespace gcn
// Inherited from KeyListener
- virtual void keyPressed(KeyEvent& keyEvent);
+ virtual void keyPressed(KeyEvent& keyEvent) = 0;
// Inherited from MouseListener
@@ -232,7 +230,7 @@ namespace gcn
*
* @param graphics a Graphics object to draw with.
*/
- virtual void drawButton(Graphics *graphics);
+ virtual void drawButton(Graphics *graphics) = 0;
/**
* Sets the drop down to be dropped down.
diff --git a/src/guichan/include/guichan/widgets/radiobutton.hpp b/src/guichan/include/guichan/widgets/radiobutton.hpp
index 0fb5b4123..e15bf86b3 100644
--- a/src/guichan/include/guichan/widgets/radiobutton.hpp
+++ b/src/guichan/include/guichan/widgets/radiobutton.hpp
@@ -152,11 +152,6 @@ namespace gcn
void adjustSize();
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
-
// Inherited from KeyListener
virtual void keyPressed(KeyEvent& keyEvent);
@@ -174,7 +169,7 @@ namespace gcn
*
* @param graphics a Graphics object to draw with.
*/
- virtual void drawBox(Graphics *graphics);
+ virtual void drawBox(Graphics *graphics) = 0;
/**
* True if the radio button is selected, false otherwise.
diff --git a/src/guichan/include/guichan/widgets/slider.hpp b/src/guichan/include/guichan/widgets/slider.hpp
index eddf02c50..ec6b82e1e 100644
--- a/src/guichan/include/guichan/widgets/slider.hpp
+++ b/src/guichan/include/guichan/widgets/slider.hpp
@@ -204,12 +204,6 @@ namespace gcn
*/
double getStepLength() const;
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
-
// Inherited from MouseListener.
virtual void mousePressed(MouseEvent& mouseEvent);
@@ -226,12 +220,6 @@ namespace gcn
virtual void keyPressed(KeyEvent& keyEvent);
protected:
- /**
- * Draws the marker.
- *
- * @param graphics A graphics object to draw with.
- */
- virtual void drawMarker(gcn::Graphics* graphics);
/**
* Converts a marker position to a value in the scale.
diff --git a/src/guichan/include/guichan/widgets/tab.hpp b/src/guichan/include/guichan/widgets/tab.hpp
index 91c09e270..55845c771 100644
--- a/src/guichan/include/guichan/widgets/tab.hpp
+++ b/src/guichan/include/guichan/widgets/tab.hpp
@@ -127,9 +127,6 @@ namespace gcn
// Inherited from Widget
- virtual void draw(Graphics *graphics);
-
-
// Inherited from MouseListener
virtual void mouseEntered(MouseEvent& mouseEvent);
diff --git a/src/guichan/include/guichan/widgets/tabbedarea.hpp b/src/guichan/include/guichan/widgets/tabbedarea.hpp
index 843bbde81..7be3b91e2 100644
--- a/src/guichan/include/guichan/widgets/tabbedarea.hpp
+++ b/src/guichan/include/guichan/widgets/tabbedarea.hpp
@@ -109,16 +109,6 @@ namespace gcn
bool isOpaque() const;
/**
- * Adds a tab to the tabbed area. The newly created tab will be
- * automatically deleted by the tabbed area when it is removed.
- *
- * @param caption The caption of the tab to add.
- * @param widget The widget to view when the tab is selected.
- * @see removeTab, removeTabWithIndex
- */
- virtual void addTab(const std::string& caption, Widget* widget);
-
- /**
* Adds a tab to the tabbed area. The tab will not be deleted by the
* tabbed area when it is removed.
*
@@ -142,7 +132,7 @@ namespace gcn
* @param index The tab to remove.
* @see addTab
*/
- virtual void removeTab(Tab* tab);
+ virtual void removeTab(Tab* tab) = 0;
/**
* Checks if a tab given an index is selected or not.
@@ -195,13 +185,10 @@ namespace gcn
*/
Tab* getSelectedTab();
-
// Inherited from Widget
virtual void draw(Graphics *graphics);
- virtual void logic();
-
void setWidth(int width);
void setHeight(int height);
@@ -228,9 +215,6 @@ namespace gcn
// Inherited from MouseListener
- virtual void mousePressed(MouseEvent& mouseEvent);
-
-
protected:
/**
* Adjusts the size of the tab container and the widget container.
diff --git a/src/guichan/include/guichan/widgets/textfield.hpp b/src/guichan/include/guichan/widgets/textfield.hpp
index 486660a8a..638b6e715 100644
--- a/src/guichan/include/guichan/widgets/textfield.hpp
+++ b/src/guichan/include/guichan/widgets/textfield.hpp
@@ -124,19 +124,11 @@ namespace gcn
virtual void fontChanged();
- virtual void draw(Graphics* graphics);
-
-
// Inherited from MouseListener
virtual void mousePressed(MouseEvent& mouseEvent);
virtual void mouseDragged(MouseEvent& mouseEvent);
-
-
- // Inherited from KeyListener
-
- virtual void keyPressed(KeyEvent& keyEvent);
protected:
/**
diff --git a/src/guichan/include/guichan/widgets/window.hpp b/src/guichan/include/guichan/widgets/window.hpp
index 3b9c62160..12e669f9d 100644
--- a/src/guichan/include/guichan/widgets/window.hpp
+++ b/src/guichan/include/guichan/widgets/window.hpp
@@ -187,17 +187,10 @@ namespace gcn
*/
virtual void resizeToContent();
-
// Inherited from BasicContainer
virtual Rectangle getChildrenArea();
-
- // Inherited from Widget
-
- virtual void draw(Graphics* graphics);
-
-
// Inherited from MouseListener
virtual void mousePressed(MouseEvent& mouseEvent);