Skip to content
Newer
Older
100644 63 lines (56 sloc) 2.55 KB
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
authored
1 /***********************************************************************
2 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
b8219ec @lylejohnson Updated copyright notice for all SWIG interface files
authored
3 * Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
authored
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * For further information please contact the author by e-mail
a934547 @lylejohnson Replaced e-mail address "lyle@users.sourceforge.net" with
authored
20 * at "lyle@lylejohnson.name".
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
authored
21 ***********************************************************************/
22
23
24 /**
2197f83 @lylejohnson checked in changes on trunk from r2610:2946
authored
25 * A Picker button allows you to identify an arbitrary location on the screen.
26 * It generates SEL_CHANGED callbacks while the user is moving the mouse, and
27 * a final SEL_COMMAND when a location has been identified. The void* parameter
28 * in the callback is a pointer to FXPoint, the location, in root-coordinates, of
29 * the place where the click took place.
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
authored
30 */
31 class FXPicker : public FXButton {
32 protected:
2197f83 @lylejohnson checked in changes on trunk from r2610:2946
authored
33 FXPoint location; // Location
34 FXbool picked; // Clicked
35 protected:
36 FXPicker();
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
authored
37 public:
38 long onMotion(FXObject*,FXSelector,void* PTR_EVENT);
39 long onLeftBtnPress(FXObject*,FXSelector,void* PTR_EVENT);
40 long onLeftBtnRelease(FXObject*,FXSelector,void* PTR_EVENT);
2197f83 @lylejohnson checked in changes on trunk from r2610:2946
authored
41 long onKeyPress(FXObject*,FXSelector,void* PTR_EVENT);
42 long onKeyRelease(FXObject*,FXSelector,void* PTR_EVENT);
43 long onHotKeyPress(FXObject*,FXSelector,void* PTR_EVENT);
44 long onHotKeyRelease(FXObject*,FXSelector,void* PTR_EVENT);
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
authored
45 public:
46 %extend {
47 // Constructor
48 FXPicker(FXComposite* p,const FXString& text,FXIcon* ic=NULL,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=BUTTON_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD){
49 return new FXRbPicker(p,text,ic,tgt,sel,opts,x,y,w,h,pl,pr,pt,pb);
50 }
51 }
52
53 // Destructor
54 virtual ~FXPicker();
55 };
56
57
58 DECLARE_FXOBJECT_VIRTUALS(FXPicker)
59 DECLARE_FXID_VIRTUALS(FXPicker)
60 DECLARE_FXDRAWABLE_VIRTUALS(FXPicker)
61 DECLARE_FXWINDOW_VIRTUALS(FXPicker)
62
Something went wrong with that request. Please try again.