Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 67 lines (58 sloc) 2.405 kb
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
1 /***********************************************************************
2 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
3 * Copyright (c) 2001 by J. Lyle Johnson. All Rights Reserved.
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
lylejohnson authored
20 * at "lyle@lylejohnson.name".
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
21 ***********************************************************************/
22
23 /**
24 * The image frame is a simple frame widget displaying
25 * an image; the image is not owned by the image frame so
26 * it must be explicitly deleted elsewhere.
27 */
28 class FXImageFrame : public FXFrame {
29 protected:
30 FXImage* image; // The image being displayed
31 protected:
32 FXImageFrame();
33 private:
34 FXImageFrame(const FXImageFrame&);
35 FXImageFrame &operator=(const FXImageFrame&);
36 public:
37 long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
38 public:
39 %extend {
40 /// Construct image frame and pass it an image
41 FXImageFrame(FXComposite* p,FXImage *img,FXuint opts=FRAME_SUNKEN|FRAME_THICK,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0){
42 return new FXRbImageFrame(p,img,opts,x,y,w,h,pl,pr,pt,pb);
43 }
44 }
45
46 /// Change the image being displayed
47 void setImage(FXImage* img);
48
49 /// Return the current image
50 FXImage* getImage() const;
51
52 /// Set the current justification mode.
53 void setJustify(FXuint mode);
54
55 /// Get the current justification mode.
56 FXuint getJustify() const;
57
58 /// Destroy the widget, but do not destroy the image
59 virtual ~FXImageFrame();
60 };
61
62
63 DECLARE_FXOBJECT_VIRTUALS(FXImageFrame)
64 DECLARE_FXID_VIRTUALS(FXImageFrame)
65 DECLARE_FXDRAWABLE_VIRTUALS(FXImageFrame)
66 DECLARE_FXWINDOW_VIRTUALS(FXImageFrame)
Something went wrong with that request. Please try again.