~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to library/forms/stub/stub_view.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (c) 2008, 2011, 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 _STUB_VIEW_H_
 
20
#define _STUB_VIEW_H_
 
21
 
 
22
#include "stub_base.h"
 
23
 
 
24
namespace mforms { namespace stub {
 
25
 
 
26
class ViewImpl : public ObjectImpl
 
27
{
 
28
protected:
 
29
  ViewImpl(::mforms::View *view);
 
30
  static void __stdcall show(::mforms::View *self, bool show);
 
31
  static bool __stdcall is_shown(::mforms::View *self);
 
32
  static void __stdcall set_tooltip(::mforms::View *self, const std::string &text);
 
33
  static int __stdcall get_width(::mforms::View *self);
 
34
  static int __stdcall get_height(::mforms::View *self);
 
35
  static int __stdcall get_preferred_width(::mforms::View *self);
 
36
  virtual int get_preferred_width();
 
37
  static int __stdcall get_preferred_height(::mforms::View *self);
 
38
  virtual int get_preferred_height();
 
39
  static int __stdcall get_x(::mforms::View *self);
 
40
  static int __stdcall get_y(::mforms::View *self);
 
41
  static void __stdcall set_size(::mforms::View *self, int w, int h);
 
42
  virtual void set_size(int width, int height);
 
43
  static void __stdcall set_position(::mforms::View *self, int x, int y);
 
44
  static void __stdcall set_enabled(::mforms::View *self, bool flag);
 
45
  static void __stdcall set_name(::mforms::View *view, const std::string &name);
 
46
  static void __stdcall relayout(::mforms::View *view);
 
47
  static void __stdcall set_needs_repaint(::mforms::View *view);
 
48
  void size_changed();
 
49
  void setup();
 
50
  virtual void move_child(ViewImpl *child, int x, int y);
 
51
  static void __stdcall set_front_color(::mforms::View *self, const std::string &color);
 
52
  static void __stdcall set_back_color(::mforms::View *self, const std::string &color);
 
53
  static void __stdcall set_back_image(::mforms::View *self, const std::string &path, mforms::ImageLayout layout);
 
54
  static void __stdcall destroy(View *self);
 
55
  static void __stdcall set_padding(View *self, int, int, int, int);
 
56
  static void __stdcall client_to_screen(View *self, int&, int&);
 
57
public:
 
58
  static void init();
 
59
};
 
60
 
 
61
};
 
62
};
 
63
 
 
64
#endif