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

« back to all changes in this revision

Viewing changes to library/forms/stub/stub_webbrowser.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
 
 
20
#ifndef _STUB_WEBBROWSER_H_
 
21
#define _STUB_WEBBROWSER_H_
 
22
 
 
23
#include "stub_view.h"
 
24
 
 
25
namespace mforms {
 
26
namespace stub {
 
27
 
 
28
class WebBrowserImpl : public ViewImpl
 
29
{
 
30
 protected:
 
31
  WebBrowserImpl(::mforms::WebBrowser *self)
 
32
    : ViewImpl(self)
 
33
  {
 
34
  }
 
35
 
 
36
  static bool __stdcall create(WebBrowser*)
 
37
  {
 
38
    return true;
 
39
  }
 
40
 
 
41
  static void __stdcall set_html(WebBrowser*, const std::string&)
 
42
  {
 
43
  }
 
44
 
 
45
  static void __stdcall navigate(WebBrowser*, const std::string&)
 
46
  {
 
47
  }
 
48
 
 
49
  static std::string __stdcall get_document_title(WebBrowser*)
 
50
  {
 
51
    return "";
 
52
  }
 
53
 
 
54
 
 
55
public:
 
56
  static void init()
 
57
  {
 
58
    ::mforms::ControlFactory *f = ::mforms::ControlFactory::get_instance();
 
59
 
 
60
    f->_webbrowser_impl.create = &WebBrowserImpl::create;
 
61
    f->_webbrowser_impl.get_document_title = &WebBrowserImpl::get_document_title;
 
62
    f->_webbrowser_impl.navigate = &WebBrowserImpl::navigate;
 
63
    f->_webbrowser_impl.set_html = &WebBrowserImpl::set_html;
 
64
  }
 
65
};
 
66
 
 
67
}
 
68
}
 
69
 
 
70
#endif