C# Класс SciterSharp.SciterWindow

Наследование: System.Windows.Forms.IWin32Window
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_api SciterSharp.Interop.SciterX.ISciterAPI

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
ProcessWindowMessage ( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr &lResult ) : bool

Приватные методы

Метод Описание
InternalProcessSciterWindowMessage ( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr pParam, bool &handled ) : IntPtr

Описание методов

CallFunction() публичный Метод

public CallFunction ( string name ) : SciterValue
name string
Результат SciterValue

CenterTopLevelWindow() публичный Метод

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
Результат void

Close() публичный Метод

Close the window. Posts WM_CLOSE message on Windows.
public Close ( ) : void
Результат void

CreateChildWindow() публичный Метод

Create an owned top-level Sciter window
public CreateChildWindow ( IntPtr hwnd_parent ) : void
hwnd_parent System.IntPtr
Результат void

CreateMainWindow() публичный Метод

public CreateMainWindow ( int width, int height, SciterXDef creationFlags = DefaultCreateFlags ) : void
width int
height int
creationFlags SciterSharp.Interop.SciterXDef
Результат void

CreateOwnedWindow() публичный Метод

public CreateOwnedWindow ( IntPtr owner, int width, int height, SciterXDef creationFlags = DefaultCreateFlags ) : void
owner System.IntPtr
width int
height int
creationFlags SciterSharp.Interop.SciterXDef
Результат void

CreateWindow() публичный Метод

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
Результат void

Destroy() публичный Метод

public Destroy ( ) : void
Результат void

ElementAtPoint() публичный Метод

Find element at point x/y of the window, client area relative
public ElementAtPoint ( int x, int y ) : SciterElement
x int
y int
Результат SciterElement

ElementByUID() публичный Метод

Searches this windows DOM tree for element with the given UID
public ElementByUID ( uint uid ) : SciterElement
uid uint
Результат SciterElement

EvalScript() публичный Метод

public EvalScript ( string script ) : SciterValue
script string
Результат SciterValue

GetMinHeight() публичный Метод

public GetMinHeight ( uint for_width ) : uint
for_width uint
Результат uint

GetMinWidth() публичный Метод

public GetMinWidth ( ) : uint
Результат uint

GetPrimaryMonitorScreenSize() публичный статический Метод

Cross-platform handy method to get the size of the screen
public static GetPrimaryMonitorScreenSize ( ) : PInvokeUtils.SIZE
Результат SciterSharp.Interop.PInvokeUtils.SIZE

LoadHtml() публичный Метод

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
Результат bool

LoadPage() публичный Метод

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
Результат bool

ProcessWindowMessage() защищенный Метод

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
Результат bool

SciterWindow() публичный Метод

public SciterWindow ( ) : System
Результат System

SetMediaType() публичный Метод

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
Результат bool

SetMediaVars() публичный Метод

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
Результат bool

SetSciterOption() публичный Метод

public SetSciterOption ( SciterXDef option, IntPtr value ) : bool
option SciterSharp.Interop.SciterXDef
value System.IntPtr
Результат bool

Show() публичный Метод

public Show ( bool show = true ) : void
show bool
Результат void

ShowModal() публичный Метод

public ShowModal ( ) : void
Результат void

UpdateWindow() публичный Метод

Update pending changes in Sciter window and forces painting if necessary
public UpdateWindow ( ) : bool
Результат bool

Описание свойств

_api защищенное статическое свойство

protected static SciterX.ISciterAPI,SciterSharp.Interop _api
Результат SciterSharp.Interop.SciterX.ISciterAPI