C# Class SciterSharp.SciterWindow

Inheritance: System.Windows.Forms.IWin32Window
Afficher le fichier Open project: MISoftware/SciterSharp Class Usage Examples

Protected Properties

Свойство Type Description
_api SciterSharp.Interop.SciterX.ISciterAPI

Méthodes publiques

Méthode Description
CallFunction ( string name ) : SciterValue
CenterTopLevelWindow ( ) : void

Centers the window in the screen. You must call it after the window is created, but before it is shown to avoid flickering

Close ( ) : void

Close the window. Posts WM_CLOSE message on Windows.

CreateChildWindow ( IntPtr hwnd_parent ) : void

Create an owned top-level Sciter window

CreateMainWindow ( int width, int height, SciterXDef creationFlags = DefaultCreateFlags ) : void
CreateOwnedWindow ( IntPtr owner, int width, int height, SciterXDef creationFlags = DefaultCreateFlags ) : void
CreateWindow ( PInvokeUtils frame = newPInvokeUtils.RECT(), SciterXDef creationFlags = DefaultCreateFlags, IntPtr parent = newIntPtr() ) : void

Creates the Sciter window and returns the native handle

Destroy ( ) : void
ElementAtPoint ( int x, int y ) : SciterElement

Find element at point x/y of the window, client area relative

ElementByUID ( uint uid ) : SciterElement

Searches this windows DOM tree for element with the given UID

EvalScript ( string script ) : SciterValue
GetMinHeight ( uint for_width ) : uint
GetMinWidth ( ) : uint
GetPrimaryMonitorScreenSize ( ) : PInvokeUtils.SIZE

Cross-platform handy method to get the size of the screen

LoadHtml ( string html, string baseUrl = null ) : bool

Loads HTML input from a string

LoadPage ( string url_or_filepath ) : bool

Loads the page resource from the given URL or file path

SciterWindow ( ) : System
SetMediaType ( string mediaType ) : bool

For example media type can be "handheld", "projection", "screen", "screen-hires", etc. By default sciter window has "screen" media type. Media type name is used while loading and parsing style sheets in the engine so you should call this function* before* loading document in it.

SetMediaVars ( SciterValue mediaVars ) : bool

For example media type can be "handheld:true", "projection:true", "screen:true", etc. By default sciter window has "screen:true" and "desktop:true"/"handheld:true" media variables. Media variables can be changed in runtime. This will cause styles of the document to be reset.

SetSciterOption ( SciterXDef option, IntPtr value ) : bool
Show ( bool show = true ) : void
ShowModal ( ) : void
UpdateWindow ( ) : bool

Update pending changes in Sciter window and forces painting if necessary

Méthodes protégées

Méthode Description
ProcessWindowMessage ( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr &lResult ) : bool

Private Methods

Méthode Description
InternalProcessSciterWindowMessage ( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr pParam, bool &handled ) : IntPtr

Method Details

CallFunction() public méthode

public CallFunction ( string name ) : SciterValue
name string
Résultat SciterValue

CenterTopLevelWindow() public méthode

Centers the window in the screen. You must call it after the window is created, but before it is shown to avoid flickering
public CenterTopLevelWindow ( ) : void
Résultat void

Close() public méthode

Close the window. Posts WM_CLOSE message on Windows.
public Close ( ) : void
Résultat void

CreateChildWindow() public méthode

Create an owned top-level Sciter window
public CreateChildWindow ( IntPtr hwnd_parent ) : void
hwnd_parent System.IntPtr
Résultat void

CreateMainWindow() public méthode

public CreateMainWindow ( int width, int height, SciterXDef creationFlags = DefaultCreateFlags ) : void
width int
height int
creationFlags SciterSharp.Interop.SciterXDef
Résultat void

CreateOwnedWindow() public méthode

public CreateOwnedWindow ( IntPtr owner, int width, int height, SciterXDef creationFlags = DefaultCreateFlags ) : void
owner System.IntPtr
width int
height int
creationFlags SciterSharp.Interop.SciterXDef
Résultat void

CreateWindow() public méthode

Creates the Sciter window and returns the native handle
public CreateWindow ( PInvokeUtils frame = newPInvokeUtils.RECT(), SciterXDef creationFlags = DefaultCreateFlags, IntPtr parent = newIntPtr() ) : void
frame SciterSharp.Interop.PInvokeUtils Rectangle of the window
creationFlags SciterSharp.Interop.SciterXDef Flags for the window creation, defaults to SW_MAIN | SW_TITLEBAR | SW_RESIZEABLE | SW_CONTROLS | SW_ENABLE_DEBUG
parent System.IntPtr
Résultat void

Destroy() public méthode

public Destroy ( ) : void
Résultat void

ElementAtPoint() public méthode

Find element at point x/y of the window, client area relative
public ElementAtPoint ( int x, int y ) : SciterElement
x int
y int
Résultat SciterElement

ElementByUID() public méthode

Searches this windows DOM tree for element with the given UID
public ElementByUID ( uint uid ) : SciterElement
uid uint
Résultat SciterElement

EvalScript() public méthode

public EvalScript ( string script ) : SciterValue
script string
Résultat SciterValue

GetMinHeight() public méthode

public GetMinHeight ( uint for_width ) : uint
for_width uint
Résultat uint

GetMinWidth() public méthode

public GetMinWidth ( ) : uint
Résultat uint

GetPrimaryMonitorScreenSize() public static méthode

Cross-platform handy method to get the size of the screen
public static GetPrimaryMonitorScreenSize ( ) : PInvokeUtils.SIZE
Résultat SciterSharp.Interop.PInvokeUtils.SIZE

LoadHtml() public méthode

Loads HTML input from a string
public LoadHtml ( string html, string baseUrl = null ) : bool
html string HTML of the page to be loaded
baseUrl string Base Url given to the loaded page
Résultat bool

LoadPage() public méthode

Loads the page resource from the given URL or file path
public LoadPage ( string url_or_filepath ) : bool
url_or_filepath string URL or file path of the page
Résultat bool

ProcessWindowMessage() protected méthode

protected ProcessWindowMessage ( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr &lResult ) : bool
hwnd System.IntPtr
msg uint
wParam System.IntPtr
lParam System.IntPtr
lResult System.IntPtr
Résultat bool

SciterWindow() public méthode

public SciterWindow ( ) : System
Résultat System

SetMediaType() public méthode

For example media type can be "handheld", "projection", "screen", "screen-hires", etc. By default sciter window has "screen" media type. Media type name is used while loading and parsing style sheets in the engine so you should call this function* before* loading document in it.
public SetMediaType ( string mediaType ) : bool
mediaType string
Résultat bool

SetMediaVars() public méthode

For example media type can be "handheld:true", "projection:true", "screen:true", etc. By default sciter window has "screen:true" and "desktop:true"/"handheld:true" media variables. Media variables can be changed in runtime. This will cause styles of the document to be reset.
public SetMediaVars ( SciterValue mediaVars ) : bool
mediaVars SciterValue Map that contains name/value pairs - media variables to be set
Résultat bool

SetSciterOption() public méthode

public SetSciterOption ( SciterXDef option, IntPtr value ) : bool
option SciterSharp.Interop.SciterXDef
value System.IntPtr
Résultat bool

Show() public méthode

public Show ( bool show = true ) : void
show bool
Résultat void

ShowModal() public méthode

public ShowModal ( ) : void
Résultat void

UpdateWindow() public méthode

Update pending changes in Sciter window and forces painting if necessary
public UpdateWindow ( ) : bool
Résultat bool

Property Details

_api protected_oe static_oe property

protected static SciterX.ISciterAPI,SciterSharp.Interop _api
Résultat SciterSharp.Interop.SciterX.ISciterAPI