5 #include "WebBrowser/IBrowserMsgListener.h" 6 #include "util/mutex.h" 7 #include <boost/thread.hpp> 8 #include <boost/shared_ptr.hpp> 15 struct SpriteFontEntity;
47 ATTRIBUTE_METHOD(
CGUIWebBrowser, Refresh_s) {cls->Refresh();
return S_OK;}
48 ATTRIBUTE_METHOD(
CGUIWebBrowser, GoBack_s) {cls->GoBack();
return S_OK;}
49 ATTRIBUTE_METHOD(
CGUIWebBrowser, GoForward_s) {cls->GoForward();
return S_OK;}
50 ATTRIBUTE_METHOD(
CGUIWebBrowser, Stop_s) {cls->Stop();
return S_OK;}
52 ATTRIBUTE_METHOD1(
CGUIWebBrowser, GetContent_s,
const char**) {*p1 = cls->GetContent().c_str();
return S_OK;}
53 ATTRIBUTE_METHOD1(
CGUIWebBrowser, SetContent_s,
const char*) {cls->SetContent(p1);
return S_OK;}
55 ATTRIBUTE_METHOD1(
CGUIWebBrowser, SetFindText_s,
const char*) {cls->FindText(p1);
return S_OK;}
57 ATTRIBUTE_METHOD1(
CGUIWebBrowser, GetFindTextResult_s,
int*) {*p1 = cls->GetLastFindTextResult();
return S_OK;}
61 static void GlobalFrameMove();
67 virtual void SetTextA(
const char* szText);
73 virtual void SetText(
const char16_t* wszText);
81 virtual int GetTextA(std::string& out);
87 virtual const char16_t* GetText();
90 bool FindText(
const std::string& sFindText);
92 int GetLastFindTextResult();
95 void SetContent(
const std::string& sContent);
97 const std::string& GetContent();
99 void SetColor(DWORD color);
100 void SetTransparency(DWORD transparency);
108 virtual void InitObject(
const char * strObjectName,
const char * alignment,
int x,
int y,
int width,
int height);
109 virtual void UpdateRects();
110 virtual HRESULT Render(
GUIState* pGUIState ,
float fElapsedTime);
112 virtual HRESULT RenderInBatch(
GUIState* pGUIState);
113 virtual bool OnChange(
const char*
code=NULL);
115 virtual void Clone(
IObject* pobj)
const;
117 virtual const IType* GetType()
const{
return m_type;}
119 static void StaticInit();
123 virtual void OnWebPageLoaded();
132 HRESULT StartWindowThread();
133 void DefaultWinThreadProc();
136 bool MsgProcCustom(UINT message,WPARAM wParam,LPARAM lParam);
139 bool PostWinThreadMessage(UINT message,WPARAM wParam,LPARAM lParam);
142 void MoveWindow(
int x,
int y,
int width,
int height,
bool bRepaint=
true);
145 void ShowBrowser(
bool bShow =
true);
147 static const IType* m_type;
152 std::string m_szUTF8_Text;
156 HWND m_hBrowserHostWnd;
160 int m_nWndX, m_nWndY, m_nWndWidth, m_nWndHeight;
163 bool m_bIsBrowserVisible;
164 bool m_bHasOnChangeEvent;
167 Boost_Thread_ptr_type m_win_thread;
169 bool m_bWindowCreated;
170 int m_nLastFindTextResult;
171 std::string m_sLastFindText;
172 std::string m_sLastWriteContent;
174 std::string m_sLastGetContent;
175 std::string m_sContent;
177 DWORD m_dwWinThreadID;
IType is for type information and validating It contains type information of an object.
Definition: Type.h:75
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: GUIWebBrowser.h:39
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
Definition: IBrowserMsgListener.h:9
different physics engine has different winding order.
Definition: EventBinding.h:32
This class represents a string inside a rectangular box in the screen coordinates Multiple Type_GUIWe...
Definition: GUIWebBrowser.h:30
base object for all 2D GUI objects (1) 2D GUI object are not tested against view frustum, instead it is controlled by visibility tag automatically or through user input.
Definition: GUIBase.h:54
static std::list< CGUIWebBrowser * > g_active_browsers
all active browsers that has already created window
Definition: GUIWebBrowser.h:149
base class for object, such as CBaseObject, IAttributeObject, GUI object.
Definition: PERef.h:287
std::u16string m_szText
Text to output to screen.
Definition: GUIWebBrowser.h:151
It's used as parameter to Render method of each GUI object.
Definition: GUIState.h:16
Definition: inftrees.h:24
bool m_bHasContent
whether the browser has content to show now
Definition: GUIWebBrowser.h:162
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: GUIWebBrowser.h:43
std::string m_szCurrentURL
current url updated automatically between page load.
Definition: GUIWebBrowser.h:154
cross platform mutex
Definition: mutex.h:95
Definition: WebBrowser.h:14
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object's name
Definition: GUIWebBrowser.h:41