2 /**************************************************************************
3 ** (c) Copyright 1998, Andromeda Technology & Automation
4 ***************************************************************************
5 ** MODULE INFORMATION *
6 ***********************
7 ** FILE NAME : button.cpp
8 ** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
9 ** VERSION NUMBER : $Revision: 1.1 $
11 ** DESCRIPTION : Implementation of button classes
16 ***************************************************************************
17 ** ADMINISTRATIVE INFORMATION *
18 ********************************
19 ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
20 ** CREATION DATE : Mar 13, 1998
21 ** LAST UPDATE : Mar 13, 1998
23 **************************************************************************/
25 /*****************************
27 Revision 1.1 2002-07-25 08:01:26 arjen
28 First checkin, AXE release 0.2
30 *****************************/
32 static const char *RCSID = "$Id: button.cpp,v 1.1 2002-07-25 08:01:26 arjen Exp $";
36 int touch_button::EV_ButtonPress(XButtonEvent ev)
38 Strength(-Strength());
43 void touch_button::click(void)
47 void toggle_button::click(void)
49 state = state == State_On ? State_Off : State_On;
53 void toggle_button::redraw(void)
55 if (state == State_On)
56 XFillRectangle(stddpy, ID(), red_gc, 6, 6, 12, 20);
58 XFillRectangle(stddpy, ID(), green_gc, 6, 6, 12, 20);