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

« back to all changes in this revision

Viewing changes to library/forms/stub/stub_splitter.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) 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_SPLITTER_H_
 
20
#define _STUB_SPLITTER_H_
 
21
 
 
22
#include "stub_view.h"
 
23
 
 
24
namespace mforms {
 
25
namespace stub {
 
26
 
 
27
class SplitterImpl : public ViewImpl
 
28
{  
 
29
protected:
 
30
  SplitterImpl(::mforms::Splitter *self, bool horiz)
 
31
    : ViewImpl(self)
 
32
  {
 
33
  }
 
34
 
 
35
  static bool __stdcall create(::mforms::Splitter *self, bool horiz)
 
36
  {
 
37
    return true;
 
38
  }
 
39
 
 
40
  static void __stdcall add(Splitter *self, View *child, int minwidth)
 
41
  {
 
42
  }
 
43
 
 
44
  static void __stdcall remove(Splitter *self, View *child)
 
45
  {
 
46
  }
 
47
  
 
48
  static void __stdcall set_position(Splitter *self, int pos)
 
49
  {
 
50
  }
 
51
 
 
52
  static int __stdcall get_position(Splitter *self)
 
53
  {
 
54
    return 0;
 
55
  }
 
56
 
 
57
  static void __stdcall set_expanded(Splitter *self, bool first, bool expand)
 
58
  {
 
59
  }
 
60
 
 
61
 
 
62
public:
 
63
  static void init()
 
64
  {
 
65
    ::mforms::ControlFactory *f = ::mforms::ControlFactory::get_instance();
 
66
 
 
67
    f->_splitter_impl.create= &SplitterImpl::create;
 
68
    f->_splitter_impl.add= &SplitterImpl::add;
 
69
    f->_splitter_impl.remove= &SplitterImpl::remove;
 
70
    f->_splitter_impl.set_position= &SplitterImpl::set_position;
 
71
    f->_splitter_impl.get_position= &SplitterImpl::get_position;
 
72
    f->_splitter_impl.set_expanded= &SplitterImpl::set_expanded;
 
73
  }
 
74
  
 
75
  virtual ~SplitterImpl()
 
76
  {
 
77
  }
 
78
};
 
79
 
 
80
}
 
81
}
 
82
 
 
83
 
 
84
#endif /* _STUB_SPLITTER_H_ */