|
! TODO: must have some sort of "global" double click time in FbTk
Reimplemented from FbTk::MenuItem.
Definition at line 45 of file IntResMenuItem.cc.
00045 {
00046 static int last_time = -201;
00047 int inc_val = 1;
00048
00050 if (time - last_time <= 200)
00051 inc_val = 5;
00052
00053 last_time = time;
00054
00055 if ((button == 4 || button == 3)&& *m_res < m_max)
00056 (*m_res) += inc_val;
00057 else if ((button == 5 || button == 1) && *m_res > m_min)
00058 (*m_res) -= inc_val;
00059
00060
00061 if (*m_res > m_max)
00062 *m_res = m_max;
00063 else if (*m_res < m_min)
00064 *m_res = m_min;
00065
00066
00067 setLabel(appendIntValue(m_org_label, *m_res).c_str());
00068
00069 MenuItem::click(button, time);
00070 }
|