Window

Describes the structure of a top-level window. It is the root node of a XUL document. It is by default a horizontally oriented box. As it is a box, all box attributes can be used. By default, the window will have a platform-specific frame around it.

To set an icon for the window, create a platform-specific icon file <windowid>.ico and/or <windowid>.xpm and place or install these files into the <mozilla-directory>/chrome/icons/default/ directory. The <windowid> is the value of the id attribute on the window. This allows you to have a different icon for each window.

For properties and methods, see the XUL Window object.

More information about window

最上位のウインドウの構造を定義する。これは XUL 文書のルートノードである。横並びを既定方向とするボックスである。ボックスであることから、 box 要素の属性すべてを利用できる。既定のふるまいでは、ウインドウ周囲の枠はプラットフォーム固有のものとなる。

ウィンドウのアイコンを設定するには、プラットフォーム固有のアイコンファイル <windowid>.ico 並びに/または <windowid>.xpm を作成して <mozilla-directory>/chrome/icons/default/ ディレクトリに置くかインストールする。 <windowid> は、ウィンドウの id 属性の値である。これによりウィンドウごとに異なるアイコンを設定することができる。

プロパティおよびメソッドについては、 XUL Window オブジェクトを参照。

window の追加情報


属性:

XUL Element から継承:

align
allowevents
allownegativeassertions
class
coalesceduplicatearcs
collapsed
container
containment
context
contextmenu
datasources
debug
dir
empty
equalsize
flags
flex
height
hidden
id
insertafter
insertbefore
left
maxheight
maxwidth
menu
minheight
minwidth
mousethrough
observes
ordinal
orient
pack
persist
popup
position
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width

height

Type: integer

Set this property to use a specific height for the window. This property, along with the width property, would usually be persisted with the persist attribute so that the next time the user opens the window, the height and width of the window will be the same as last time.

型 : integer

ウィンドウに特定の高さを指定するには、この属性を設定する。このプロパティは、 width プロパティとともに、通常は persist 属性で永続化される。そのためユーザが次にこのウィンドウを開いたときに、ウィンドウの高さと幅が前のときと同じになっている。

hidechrome

Type: boolean

Set this attribute to true to have the chrome including the titlebar hidden.

型 : boolean

この属性を true に設定すると、隠れたタイトルバーを含む chrome を持つことができる。

id

Type: element id, must be unique in the window

The window id. This is used to identify the window and to construct the filename for the icon for the window.

型 : element id, must be unique in the window

ウィンドウの id。ウィンドウを識別するために使用される。また、ウィンドウのアイコンのファイル名を構成するのにも使用される。

screenX

Type: integer

The horizontal position that the window appears on the screen.

型 : integer

ウィンドウがスクリーンに表示される水平方向位置。

screenY

Type: integer

The vertical position that the window appears on the screen.

型 : integer

ウィンドウがスクリーンに表示される垂直方向位置。

sizemode

Type: one of the values below

The state of the window. The following values may be used:

  • maximized: The window is maximized, and occupies the full size of the screen.
  • minimized: The window is minimized, or hidden.
  • normal: The window appears in a normal state at the desired size.

型 : 以下の値の一つ

ウィンドウの状態。以下の値を使用できる。

  • maximized: ウィンドウは最大化されており、スクリーンの全サイズを占めている。
  • minimized: ウィンドウは最小化されており、隠れている。
  • normal: ウィンドウは通常状態であり、要求されたサイズで表示されている。
title

Type: string

The text to appear on the title bar of the window.

型 : string

ウィンドウのタイトルバーに表示されるテキスト。

width

Type: integer

Set this property to use a specific width for the window.

型 : integer

ウィンドウに特定の幅を指定するには、この属性を設定する。

windowtype

Type: string

Set to a string which can be used to identify the type of window. This might be used, for example, to distingush between a browser window and an editor window. Some of Mozilla's window handling functions use this attribute to group windows of the same type together.

型 : string

ウィンドウの型を識別するのに用いる文字列に設定する。例えば、ブラウザウィンドウとエディタウィンドウを区別するのに用いることができる。 Mozilla のウィンドウ操作関数には、この属性を使って同じ型のウィンドウを一つにグループ化するものがある。


プロパティとメソッド:

XUL Element から継承:

align allowEvents blur boxObject boxObject.element
boxObject.getLookAndFeelMetric boxObject.height boxObject.screenX boxObject.screenY boxObject.width
boxObject.x boxObject.y builder className click
collapsed contextMenu controllers database datasources
dir doCommand flex focus getElementsByAttribute
height hidden id left maxHeight
maxWidth menu minHeight minWidth observes
ordinal orient pack persist ref
resource statusText style tooltip tooltipText
top width

Element から継承:

addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName

Copyright (C) 1999 - 2004 XulPlanet.com