3 * Purpose: wxPluginFrame declaration
7 * Copyright: (c) Julian Smart
10 #ifndef __PLUGINFRAME__
11 #define __PLUGINFRAME__
17 WXDLLEXPORT
extern const char *wxFrameNameStr
;
20 class WXDLLEXPORT wxPluginFrame
: public wxFrame
22 DECLARE_DYNAMIC_CLASS(wxPluginFrame
)
26 inline wxPluginFrame(const wxPluginData
& data
)
39 bool Create(const wxPluginData
& data
);
41 // Sets and subclasses the platform-specific window handle
42 virtual bool SetNPWindow(NPWindow
*window
);
43 inline NPWindow
*GetNPWindow(void) { return m_npWindow
; }
45 void SetClientSize(const int width
, const int height
);
46 void GetClientSize(int *width
, int *height
) const;
48 void GetSize(int *width
, int *height
) const ;
49 void GetPosition(int *x
, int *y
) const ;
50 void SetSize(const int x
, const int y
, const int width
, const int height
, const int sizeFlags
= wxSIZE_AUTO
);
53 inline int GetAttributeCount(void) const { return m_nAttributes
; }
54 inline wxString
GetAttributeName(const int n
) { return m_names
[n
]; }
55 inline wxString
GetAttributeValue(const int n
) { return m_values
[n
]; }
57 void SetAttributeValues(const int n
, const char* argn
[], const char *argv
[]);
58 void SetAttributeValues(const int n
, const wxString
* argn
, const wxString
* argv
);
59 inline void SetInstance(const NPP instance
) { m_npInstance
= instance
; };
60 inline NPP
GetInstance(void) { return m_npInstance
; }
62 // Overridables: low-level
63 virtual NPError
OnNPNewStream(NPMIMEType type
, NPStream
*stream
, bool seekable
, uint16
* stype
);
64 virtual void OnNPNewFile(NPStream
*stream
, const wxString
& fname
);
65 virtual void OnNPPrint(NPPrint
* printInfo
);
67 // Overridables: high-level
68 virtual void OnPrint(wxPrinterDC
& dc
, wxRect
& rect
);
69 virtual void OnDraw(wxDC
& dc
);