MySQL Workbench  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
imagebox.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; version 2 of the
7  * License.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17  * 02110-1301 USA
18  */
19 #ifndef _MFORMS_IMAGEBOX_H_
20 #define _MFORMS_IMAGEBOX_H_
21 
22 #include <mforms/base.h>
23 #include <mforms/view.h>
24 
25 namespace mforms
26 {
27  class ImageBox;
28 
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 #ifndef SWIG
31  struct ImageBoxImplPtrs
32  {
33  bool (*create)(ImageBox *);
34  void (*set_image)(ImageBox *, const std::string&);
35  void (*set_image_data)(ImageBox*, const char *data, size_t length);
36  void (*set_scale_contents)(ImageBox *, bool);
37  void (*set_image_align)(ImageBox *, Alignment);
38  };
39 #endif
40 #endif
41 
43  class MFORMS_EXPORT ImageBox : public View
44  {
45  public:
46  ImageBox();
47 
51  void set_image(const std::string &file);
52 
53 #ifndef SWIG
54  void set_image_data(const char *data, size_t length);
55 #endif
56 
58  void set_scale_contents(bool flag);
59 
61  void set_image_align(Alignment alignment);
62 
63  protected:
64  ImageBoxImplPtrs *_imagebox_impl;
65  };
66 };
67 
68 #endif
Shows an image file.
Definition: imagebox.h:43
#define MFORMS_EXPORT
Definition: base.h:33
ImageBoxImplPtrs * _imagebox_impl
Definition: imagebox.h:64
Alignment
Definition: view.h:40
MySQL Workbench 6.1 documentation