Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

virtual void OglGui::StringColumns::MouseFunc ( int  msg,
int  btn,
int  state,
int  x,
int  y 
) [inline, virtual]

This function is called by the event handling system everytime the user has moved or clicked the mouse.

So if you want a window which reacts to the mouse in a specific way, you can inherit a class from Window. Another method to implement mouse behaviour is to use a window listener (in this case you have to inherit a class from WindowListener and attach it to this window, see WindowListener for more details)

Reimplemented from OglGui::Window.

Definition at line 207 of file StringColumns.h.

References FindColumn(), FindRow(), isSelectedBit, mColumns, OglGui::Window::MouseFunc(), SelectRange(), and ToggleOptionsBit().

00208     {
00209         if (msg==oglMouseDown && btn==oglLeftButton)
00210         {
00211             int c = FindColumn(x);
00212             int r = FindRow(y);
00213 
00214             if (c!=-1 && r>0 && r<mColumns[c].strVector.size())
00215             {
00216                 int marked = mColumns[c].marked;
00217                 if (!(state & oglShift))
00218                     marked = r;
00219                 if (!(state & oglControl))
00220                     SelectRange(c,marked,r);
00221                 else
00222                     ToggleOptionsBit(mColumns[c].strOptions[r],isSelectedBit);
00223                 mColumns[c].marked = marked;
00224             }
00225         }
00226         Window::MouseFunc(msg,btn,state,x,y);
00227     }

Here is the call graph for this function:


Generated on Fri Mar 19 12:06:49 2010 for ImpalaSrc by  doxygen 1.5.1