]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/entry.cpp
Style update: add spaces around assignments
[libs/gltk.git] / source / entry.cpp
index 7d5ecb66986d4ef9580745ca3c5594c942cd0182..91bd9c0ce82072219bdd46efa48e2d40e39392dc 100644 (file)
@@ -31,8 +31,8 @@ Entry::Entry(const Resources &r, const string &t):
 
 void Entry::set_text(const string &t)
 {
-       text=t;
-       edit_pos=text.size();
+       text = t;
+       edit_pos = text.size();
 }
 
 void Entry::set_multiline(bool m)
@@ -56,16 +56,16 @@ void Entry::key_press(unsigned key, unsigned, wchar_t ch)
        {
                unsigned row, col;
                text.offset_to_coords(edit_pos, row, col);
-               edit_pos=text.coords_to_offset(row+1, col);
+               edit_pos = text.coords_to_offset(row+1, col);
        }
        else if(key==Input::KEY_UP && multiline)
        {
                unsigned row, col;
                text.offset_to_coords(edit_pos, row, col);
                if(row>0)
-                       edit_pos=text.coords_to_offset(row-1, col);
+                       edit_pos = text.coords_to_offset(row-1, col);
                else
-                       edit_pos=0;
+                       edit_pos = 0;
        }
        else if(key==Input::KEY_BACKSPACE)
        {
@@ -98,7 +98,7 @@ void Entry::render_special(const Part &part) const
                unsigned row, col;
                text.offset_to_coords(edit_pos, row, col);
 
-               Geometry rgeom=text.coords_to_geometry(row, col);
+               Geometry rgeom = text.coords_to_geometry(row, col);
                part.get_alignment().apply(rgeom, geom, part.get_margin());
 
                GL::push_matrix();