KLayout Manual: Main Index » Class Index » API reference - Class BrowserDialog

API reference - Class BrowserDialog

Notation used in Ruby API documentation

Description: The HTML browser dialog

The HTML browser displays HTML code in a browser panel. It receives the code by retrieving it from a given URL.

URL's with the special scheme "int" are retrieved from a BrowserSource object. This will act as a kind of server for these URL's.

Public constructors

BrowserDialognewCreates a new object of this class

Public methods

voidcaption=(string caption)Set the caption of the window
[virtual]voidclosedCallback when the dialog is closed
voidcreateEnsures the C++ object is created
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
intexecExecute the HTML browser dialog as a modal window
voidhideHide the HTML browser window
voidhome=(string home_url)Set the browser's initial and current URL which is selected if the "home" location is choosen
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
voidload(string arg1)Load the given URL into the browser dialog
voidreloadReload the current page
voidresize(int width,
int height)
Set the size of the dialog window
voidshowShow the HTML browser window in a non-modal way
voidsource=(BrowserSource ptr source)Connect to a source object

Deprecated methods (protected, public, static, non-static and constructors)

voidset_caption(string caption)Use of this method is deprecated. Use caption= instead
voidset_home(string home_url)Use of this method is deprecated. Use home= instead
voidset_size(int width,
int height)
Use of this method is deprecated. Use resize instead
voidset_source(BrowserSource ptr source)Use of this method is deprecated. Use source= instead

Detailed description

void caption=(string caption)

Description: Set the caption of the window

[virtual] void closed

Description: Callback when the dialog is closed

This callback can be reimplemented to implement cleanup functionality when the dialog is closed.

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

int exec

Description: Execute the HTML browser dialog as a modal window

void hide

Description: Hide the HTML browser window

void home=(string home_url)

Description: Set the browser's initial and current URL which is selected if the "home" location is choosen

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void load(string arg1)

Description: Load the given URL into the browser dialog

[static] BrowserDialog new

Description: Creates a new object of this class

void reload

Description: Reload the current page

void resize(int width,int height)

Description: Set the size of the dialog window

void set_caption(string caption)

Description: Set the caption of the window

This method is deprecated. Use method 'caption=' instead

void set_home(string home_url)

Description: Set the browser's initial and current URL which is selected if the "home" location is choosen

This method is deprecated. Use method 'home=' instead

void set_size(int width,int height)

Description: Set the size of the dialog window

This method is deprecated. Use method 'resize' instead

void set_source(BrowserSource ptr source)

Description: Connect to a source object

This method is deprecated. Use method 'source=' instead

void show

Description: Show the HTML browser window in a non-modal way

void source=(BrowserSource ptr source)

Description: Connect to a source object

Setting the source should be the first thing done after the BrowserDialog object is created. It will not have any effect after the browser has loaded the first page. In particular, home= should be called after the source was set.