Code cleanups

on behalf of Lebedev, see issue 1355
This commit is contained in:
Oliver Duis
2012-05-06 22:10:37 +02:00
parent 686188d6bb
commit 1483ecb47c
125 changed files with 750 additions and 747 deletions

View File

@@ -29,7 +29,7 @@ LWButton::LWButton (Cairo::RefPtr<Cairo::ImageSurface> i, int aCode, void* aData
w = h = 2;
}
void LWButton::getSize (int& minw, int& minh) {
void LWButton::getSize (int& minw, int& minh) const {
minw = w;
minh = h;
@@ -41,7 +41,7 @@ void LWButton::setPosition (int x, int y) {
ypos = y;
}
void LWButton::getPosition (int& x, int& y) {
void LWButton::getPosition (int& x, int& y) const {
x = xpos;
y = ypos;
@@ -58,7 +58,7 @@ void LWButton::setIcon (Cairo::RefPtr<Cairo::ImageSurface> i) {
w = h = 2;
}
Cairo::RefPtr<Cairo::ImageSurface> LWButton::getIcon () {
Cairo::RefPtr<Cairo::ImageSurface> LWButton::getIcon () const {
return icon;
}
@@ -73,7 +73,7 @@ void LWButton::setColors (const Gdk::Color& bg, const Gdk::Color& fg) {
fgb = fg.get_blue_p ();
}
bool LWButton::inside (int x, int y) {
bool LWButton::inside (int x, int y) const {
return x>xpos && x<xpos+w && y>ypos && y<ypos+h;
}
@@ -168,13 +168,13 @@ void LWButton::redraw (Cairo::RefPtr<Cairo::Context> context) {
}
}
void LWButton::getAlignment (Alignment& ha, Alignment& va) {
void LWButton::getAlignment (Alignment& ha, Alignment& va) const {
ha = halign;
va = valign;
}
Glib::ustring LWButton::getToolTip (int x, int y) {
Glib::ustring LWButton::getToolTip (int x, int y) const {
if (inside (x, y))
return toolTip;