Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXImageFrame.h
1 /********************************************************************************
2 * *
3 * I m a g e F r a m e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2001,2017 by H. J. Daniel III. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXIMAGEFRAME_H
22 #define FXIMAGEFRAME_H
23 
24 #ifndef FXFRAME_H
25 #include "FXFrame.h"
26 #endif
27 
28 namespace FX {
29 
30 
36 class FXAPI FXImageFrame : public FXFrame {
37  FXDECLARE(FXImageFrame)
38 protected:
39  FXImage* image; // The image being displayed
40 protected:
41  FXImageFrame();
42 private:
43  FXImageFrame(const FXImageFrame&);
44  FXImageFrame &operator=(const FXImageFrame&);
45 public:
46  long onPaint(FXObject*,FXSelector,void* ptr);
47 public:
48 
50  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);
51 
53  virtual void create();
54 
56  virtual FXint getDefaultWidth();
57 
59  virtual FXint getDefaultHeight();
60 
62  void setImage(FXImage* img);
63 
65  FXImage* getImage() const { return image; }
66 
68  void setJustify(FXuint mode);
69 
71  FXuint getJustify() const;
72 
74  virtual void save(FXStream& store) const;
75 
77  virtual void load(FXStream& store);
78 
80  virtual ~FXImageFrame();
81  };
82 
83 }
84 
85 
86 #endif

Copyright © 1997-2016 Jeroen van der Zijp