mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-22 22:02:34 -06:00
1. fix to compile on branch 2272 and 2357, 2. maximize workaround for linux backend 3. on screen keyboard is closed before browser exits. git-svn-id: svn://ultimatepp.org/upp/trunk@8459 f0d560ea-af0d-0410-9eb7-867de7ffcac7
30 lines
936 B
C++
30 lines
936 B
C++
#ifndef _ChromiumBrowserExample_ChromiumBrowserExample_h
|
|
#define _ChromiumBrowserExample_ChromiumBrowserExample_h
|
|
|
|
#include <CtrlLib/CtrlLib.h>
|
|
#include <ChromiumBrowser/ChromiumBrowser.h>
|
|
#include "Utils.h"
|
|
|
|
namespace Upp{
|
|
|
|
#define LAYOUTFILE <ChromiumBrowserExample/ChromiumBrowserExample.lay>
|
|
#include <CtrlCore/lay.h>
|
|
|
|
class ChromiumBrowserExample : public WithChromiumBrowserExampleLayout<TopWindow> {
|
|
|
|
private:
|
|
|
|
void Close() { Upp::ShowKeyboard(false); TopWindow::Close(); }
|
|
void OnUrlChange(String url) { Url.SetData(url); Url.CancelSelection(); }
|
|
void OnTakeFocus() { Url.SetFocus(); }
|
|
void OnConsoleMessage(String url, int line, String msg) { RLOG(Format("Console message: url=%s, line=%d, msg=%s", url, line, msg)); }
|
|
void OnBrowse() { Browser.Browse(~Url); }
|
|
|
|
public:
|
|
typedef ChromiumBrowserExample CLASSNAME;
|
|
ChromiumBrowserExample();
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|