すべてのファーストクラス グラフィカル オブジェクトの (抽象) 基本クラス。このオブジェクトは、グラフィックで表示したり、レイアウト ネゴシエーションに参加できます。
注意事項
プログラミング注意事項
| このタイプの新しいオブジェクトを作成するために |
| true の場合は、この Graphic のコンテナは、パジネーションが実行される時に、この |
| グラフィカル オブジェクトの背景色または背景パターン。 |
| グラフィカル オブジェクトの境界の色またはパターン。 |
| オブジェクトの境界の外観を指定します。 |
| オブジェクトの境界の幅を指定します。 |
| Table のテーブル セル ボーダーの幅を指定します。 |
| テーブル セルの境界とその子スロット (テーブル セルがその子グラフィックを配置する場所) の間の距離を指定します。 |
| この |
| この Graphic が |
| このオブジェクトに関連付けられている |
| この Graphic を |
| オブジェクトの外側起点の x 座標を指定します。 |
| true の場合は、この Graphic がパジネートします。 |
| このオブジェクトに関連付けて、 |
| オブジェクトのボーダーとその子スロット (オブジェクトがそのグラフィカルな子を配置する場所) との間の距離を指定します。 |
| 透明なセクションに発生する |
| オブジェクトのオプションの親を返します。 |
| このオプションが非 null のときは、この |
| オブジェクトのグラフィカルな親を返します。 |
| このグラフィックとそのグラフィック子孫に関連付けられた |
| 影の色です。既定の色は黒で、アルファ値は 0.175 です。 |
| 描画や |
| 最後のレイアウト ネゴシエーションが完了してから、 |
| 指定した高さの制約を受けた場合にこの |
| 指定した高さの制約を受けた場合にこの |
| 指定されたポイントで発生するイベントが、ターゲット ボックス ( |
| をそのグラフィカルな親から削除します。 |
| このオブジェクトの可視表現を描画します。 |
| このグラフィックの一部を選択領域として描画します。 |
| オブジェクトの影を描画します。 |
| この |
| 与えられた述語に適合する最も近いグラフィックの祖先を返します。 |
| 指定ポイントをカバーし、指定テストの条件を満たす |
| 与えられた述語に適合する最も近いグラフィックの祖先を返します。 |
| このオブジェクトで |
| この |
| グラフィック階層内における指定された祖先に対する |
| グラフィック階層のルートにあるオブジェクトを基準とし、Visual の位置を取得します。 |
| start-bound と end-bound 間の、このグラフィック内に含まれる選択したテキストを取得します。 |
| グラフィック階層に含まれる指定上位オブジェクトの座標フレームでこのオブジェクトの左上隅のロケーションを見つけます。 |
| オブジェクトの実際の可視領域の境界ボックスを計算します。 |
| この |
| 位置 x、y にある目に見えるグラフィカルな子を規定します。 |
| この Graphic を参照する |
| このオブジェクトにオプションの値が変更したことを通知します。 |
| グラフィックにパジネーションを適用します。 |
| ボーダーやマージンを含めたオブジェクトのセル全体を描画します。 |
| このオブジェクトで |
| このオブジェクトで |
| このオブジェクトに代わって別のオブジェクトをグラフィック階層に置きます。 |
| 描画する |
| 指定した |
| 表示されたオブジェクトの幾何形状が変更されていることを宣言し、必要な |
| この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。 |
| この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。通常このメソッドは、アプリケーション コードから直接呼び出しません。代わりに |
| この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。 |
| この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。通常このメソッドは、アプリケーション コードから直接呼び出しません。代わりに |
| このオブジェクトにレイアウト幅と高さを代入します。 |
| パジネートできるように |
| 2 つの グラフィカル オブジェクトの起点の間の (x、y) オフセットを計算します。 |
このタイプの新しいオブジェクトを作成するために
注意事項
説明
説明
true の場合は、この Graphic のコンテナは、パジネーションが実行される時に、この
注意事項
グラフィカル オブジェクトの背景色または背景パターン。
説明
例
| 例: 背景を文字列に設定 | |
{CheckButton
label="Check here if you like my background",
background="lime"
}
|
| 例: 背景を Background オブジェクトに設定 | |
![]() | |
{Fill
width = 2cm,
height = 2cm,
background =
{Background
{url "curl://install/docs/default/images/grass.jpg"}
}
}
|
注意事項
グラフィカル オブジェクトの境界の色またはパターン。
説明
説明
例
| 例: BorderSpec の使用 | |
![]() | |
{define-proc package {make-frame
border-style:BorderStyle,
border-color:FillPattern =
FillPattern.blue,
border-spec:#BorderSpec = null
}
{return
{Frame
border-width = 3pt,
margin = 10pt,
background = FillPattern.silver,
border-color = border-color,
border-style = border-style,
border-spec = border-spec,
"Apple"
}
}
}
{spaced-hbox
margin = 2pt,
|| Note that this Frame is setting the left and right border
|| width to 0pt. Since top and bottom border width are not
|| specified in the BorderSpec they will be equal to the
|| value of the border-width option on the Frame.
{make-frame
BorderStyle.dot,
border-spec =
{BorderSpec
left-border-width = 0pt,
right-border-width = 0pt
}
},
|| Note that this Frame is setting the left and right margin
|| to 0pt. Since top and bottom margin are not specified in the
|| BorderSpec they will be equal to the value of the margin
|| option on the Frame.
{make-frame
BorderStyle.dot,
border-spec =
{BorderSpec
left-margin = 0pt,
right-margin = 0pt
}
}
}
|
オブジェクトの境界の外観を指定します。
説明
例
| 例: 次は、さまざまなテーブル セルのボーダー スタイルを青で表示しています (tiled を除く)。 | |
{define-proc package {make-frame
border-style:BorderStyle,
border-color:FillPattern =
FillPattern.blue
}
let label:String = {{String border-style}.tail 12}
{return
|| Outer Frame is added for spacing only.
{Frame margin = 3pt,
{Frame
width = 2cm,
height = 1cm,
border-width = 3pt,
background = FillPattern.silver,
border-color = border-color,
border-style = border-style,
label
}
}
}
}
{RasterBox
{make-frame BorderStyle.none},
{make-frame BorderStyle.flat},
{make-frame BorderStyle.raised},
{make-frame BorderStyle.sunken},
{make-frame BorderStyle.ridge},
{make-frame BorderStyle.groove},
{make-frame BorderStyle.dash},
{make-frame BorderStyle.dot},
{make-frame BorderStyle.double}
}
|

| 例: tiled ボーダー スタイルの使用 | |
![]() | |
{let constant f:Frame =
{Frame
border-width = 60px,
border-style = BorderStyle.tiled,
border-color =
{FillPattern.from-url
{url "curl://source/docs/default/images/tiled-border.gif"}
}
}
}
{value
{f.add
{HBox
background = "#6f4e20",
control-content-background = "#6f4e20",
color = "white",
spacing = 5mm,
"border-width:",
{TextField
width = 2cm,
value = "60px",
control-appearance-changeable? = true,
{on ValueFinished at tf:TextField do
set f.border-width = {evaluate tf.value}
}
}
}
}
f
}
|
注意事項
オブジェクトの境界の幅を指定します。
説明
例
| 例 | |
![]() | |
{spaced-hbox
valign="bottom",
{Frame width=3cm,
height=2cm,
background="silver",
border-color="blue",
border-width=3pt},
{Frame width=3cm,
height=2cm,
background="silver",
border-color="blue",
border-width=0.25cm}}
|
注意事項
説明
例
| 例: BorderSpec の使用 | |
![]() | |
{define-proc package {make-table
cell-border-style:BorderStyle,
cell-border-color:FillPattern =
FillPattern.blue,
cell-border-spec:#BorderSpec = null
}
{return
{Table
columns = 3,
width = 7cm,
height = 3cm,
background = FillPattern.silver,
border-width = 1pt,
border-color = FillPattern.black,
cell-border-style = cell-border-style,
cell-border-color = cell-border-color,
cell-border-width = 2pt,
cell-margin = 5pt,
cell-border-spec = cell-border-spec,
"Apple", "Banana", "Grapes",
"Papaya", "Strawberry", "Guava"
}
}
}
{spaced-hbox
margin = 2pt,
|| Note that this Table is setting the left and right cell
|| border width to 0pt. Since top and bottom cell border width
|| are not specified in the BorderSpec they will be equal to
|| the value of the cell-border-width option on the Table.
{make-table
BorderStyle.flat,
cell-border-spec =
{BorderSpec
left-border-width = 0pt,
right-border-width = 0pt
}
},
|| Note that this Table is setting the left and right cell
|| margin to 0pt. Since top and bottom cell margin are not
|| specified in the BorderSpec they will be equal to the
|| value of the cell margin option on the Table.
{make-table
BorderStyle.flat,
cell-border-spec =
{BorderSpec
left-margin = 0pt,
right-margin = 0pt
}
}
}
|
Table のテーブル セル ボーダーの幅を指定します。
説明
例

注意事項
テーブル セルの境界とその子スロット (テーブル セルがその子グラフィックを配置する場所) の間の距離を指定します。
説明
注意事項
例

この
オーバーライド
この Graphic が
説明
このオブジェクトに関連付けられている
プログラミング注意事項
説明
例
| 例 | |
{paragraph I am enabled}
{paragraph enabled? = false, I'm not}
|
例
| 例 | |
![]() | |
{radio-buttons
value = "first",
{RadioButton radio-value = "first"},
{RadioButton
radio-value = "second",
reactive-label = {ReactiveLabel
label-disabled = "(second)"
},
enabled? = false
},
{RadioButton radio-value = "third"}
}
|
この Graphic を
説明
オブジェクトの外側起点の x 座標を指定します。
説明
| 例 | |
![]() | |
{VBox
halign="origin",
{Rule color="blue", height=18pt, width=1pixel},
{RectangleGraphic
horigin="center",
fill-color="red",
height=30pt,
width=144pt,
border-color="cyan",
border-width=4pt,
margin=2pt},
{Rule color="blue", height=18pt, width=1pixel}} |
true の場合は、この Graphic がパジネートします。
注意事項
このオブジェクトに関連付けて、
オブジェクトのボーダーとその子スロット (オブジェクトがそのグラフィカルな子を配置する場所) との間の距離を指定します。
説明
注意事項
例
| 例 | |
{HBox spacing=6pt, border-color="black",
valign="bottom",
{Frame width=2cm,
height=1cm,
background="blue",
|| margin not specified
border-width=2pt, {RectangleGraphic fill-color="silver"}},
{Frame width=2cm,
height=1cm,
background="blue",
|| margin is same as border width
margin=2pt,
border-width=2pt, {RectangleGraphic fill-color="silver"}},
{Frame width=2cm,
height=1cm,
background="blue",
|| margin is greater than border width
margin=4pt,
border-width=2pt, {RectangleGraphic fill-color="silver"}}}
|
透明なセクションに発生する
説明
注意事項
オブジェクトのオプションの親を返します。
戻り値
オーバーライド
説明
例
| 例: 外側のマージンの使用 | |
{HBox
background = "lime",
{Frame
background = "pink",
outside-margin =
{OffsetSpec
left = 4pt, right = 2pt, top = 4pt, bottom = 4pt
},
"Hello"
},
{Frame
background = "pink",
outside-margin =
{OffsetSpec
left = 2pt, right = 4pt, top = 4pt, bottom = 4pt
},
"Hello"
}
}
|
このオプションが非 null のときは、この
注意事項
プログラミング注意事項
オブジェクトのグラフィカルな親を返します。
戻り値
オーバーライド
このグラフィックとそのグラフィック子孫に関連付けられた
影の色です。既定の色は黒で、アルファ値は 0.175 です。
説明
注意事項
例
| 例: ShadowSpec の使用 | |
{def button =
{CommandButton
outside-margin =
{OffsetSpec
left = 30px, right = 30px,
top = 30px, bottom = 30px
},
shadow-spec = {ShadowSpec},
shadow-color = {FillPattern.from-rgb 0, 0, 0, opacity = 0.175}
}
}
{def demo =
{value
let offset-slider:#Slider
let angle-slider:#Slider
let radius-slider:#Slider
let falloff-slider:#Slider
let opacity-slider:#Slider
let ul-round?:#CheckButton
let ur-round?:#CheckButton
let lr-round?:#CheckButton
let ll-round?:#CheckButton
def change-handler =
{on ValueChanged do
set button.shadow-spec =
{ShadowSpec
offset = offset-slider.value asa double * 1px,
angle = angle-slider.value asa double * 1deg,
corner-radius = radius-slider.value asa double * 1px,
falloff = falloff-slider.value asa int,
upper-left-rounded? = ul-round?.value,
upper-right-rounded? = ur-round?.value,
lower-right-rounded? = lr-round?.value,
lower-left-rounded? = ll-round?.value
}
}
set offset-slider =
{Slider
width = 10cm,
domain =
{StandardIntDomain
default-value = 6,
min-allowable = 0,
max-allowable = 20
},
minor-tick-spacing = 1,
major-tick-spacing = 5,
change-handler
}
set angle-slider =
{Slider
width = 10cm,
domain =
{StandardIntDomain
default-value = 135,
min-allowable = 0,
max-allowable = 360
},
minor-tick-spacing = 30,
major-tick-spacing = 90,
change-handler
}
set radius-slider =
{Slider
width = 10cm,
domain =
{StandardFloatDomain
default-value = button.shadow-spec.corner-radius asa PixelDistance / 1px,
min-allowable = 0.0f,
max-allowable = 10.0f
},
minor-tick-spacing = .5,
major-tick-spacing = 2f,
change-handler
}
set falloff-slider =
{Slider
width = 10cm,
domain =
{StandardIntDomain
default-value = button.shadow-spec.falloff,
min-allowable = 0,
max-allowable = 10
},
minor-tick-spacing = 1f,
major-tick-spacing = 2f,
change-handler
}
set opacity-slider =
{Slider
width = 10cm,
domain =
{StandardFloatDomain
default-value = {button.shadow-color.to-Pixel}.alpha,
min-allowable = 0.0f,
max-allowable = 1.0f
},
minor-tick-spacing = .05f,
major-tick-spacing = .2f,
{on ValueChanged do
set button.shadow-color =
{FillPattern.from-rgb 0, 0, 0, opacity =
opacity-slider.value asa double
}
}
}
set ul-round? =
{CheckButton
label = "upper-left",
value = button.shadow-spec.upper-left-rounded?,
change-handler
}
set ur-round? =
{CheckButton
label = "upper-right",
value = button.shadow-spec.upper-right-rounded?,
change-handler
}
set lr-round? =
{CheckButton
label = "lower-right",
value = button.shadow-spec.lower-right-rounded?,
change-handler
}
set ll-round? =
{CheckButton
label = "lower-left",
value = button.shadow-spec.lower-left-rounded?,
change-handler
}
{VBox
{center {value button}},
{Dialog
{Table
{row-prototype button},
{row-prototype "offset", {Fill width = 12pt}, offset-slider},
{row-prototype "angle", {Fill width = 12pt}, angle-slider},
{row-prototype "radius", {Fill width = 12pt}, radius-slider},
{row-prototype "falloff", {Fill width = 12pt}, falloff-slider},
{row-prototype "shadow-color opacity", {Fill width = 12pt}, opacity-slider},
{row-prototype "corners rounded?", {Fill width = 12pt},
{HBox spacing = 8pt, ul-round?, ur-round?, lr-round?, ll-round?}
}
}
}
}
}
}
{CommandButton
label = "Press me to display the example!",
{on Action do
def view =
{View
visibility = "normal",
{VBox
margin = 10pt,
spacing = 24pt,
demo
}
}
{view.set-rendering-mode RenderingMode.high-quality}
}
}
|
描画や
説明
説明
説明
| 例 | |
{VBox
spacing=2pt,
{Frame
background="yellow",
width={make-origin-elastic first=30pt, last=20pt},
"\|"
},
{Frame
background="lime",
width={make-origin-elastic first=20pt, last=40pt},
"\|"
}
}
|
| 例 | |
{HBox width = 4in,
valign = "bottom",
{Frame
background = "pink",
height = {add-stretch},
{RectangleGraphic
width = 1.2in,
height = {make-elastic
preferred-size = 14pt,
stretch-order = rigid-stretch-order
}
}
},
{Fill width = 5mm},
{Frame
background = "blue",
color = "white",
width = 48pt,
height = 40pixel,
"Hi there"
}
}
|
| 例 | |
![]() | |
{value
let w:Distance = 4.0pt
let num-rects:int = 50
let rounded:HBox = {HBox}
let unrounded:HBox = {HBox}
{for i:int =
0 below num-rects do
{rounded.add
{RectangleGraphic height = 15pt, width = w}
}
{unrounded.add
{RectangleGraphic
height = 15pt,
width = {make-elastic
preferred-size = w,
stretch-order =
rigid-stretch-order
}
}
}
}
{VBox
rounded,
unrounded,
{RectangleGraphic
height = 15pt,
width = {make-elastic
preferred-size = w * num-rects,
stretch-order =
rigid-stretch-order
}
}
}
}
|
プログラミング注意事項
オーバーライド
最後のレイアウト ネゴシエーションが完了してから、
戻り値
注意事項
プログラミング注意事項
オーバーライド
プログラミング注意事項
オーバーライド
指定した高さの制約を受けた場合にこの
戻り値
オーバーライド
指定した高さの制約を受けた場合にこの
戻り値
オーバーライド
指定されたポイントで発生するイベントが、ターゲット ボックス (
プログラミング注意事項
オーバーライド
注意事項
オーバーライド
をそのグラフィカルな親から削除します。
このオブジェクトの可視表現を描画します。
オーバーライド
このグラフィックの一部を選択領域として描画します。
説明
オーバーライド
オブジェクトの影を描画します。
オーバーライド
説明
この
プログラミング注意事項
注意事項
与えられた述語に適合する最も近いグラフィックの祖先を返します。
戻り値
指定ポイントをカバーし、指定テストの条件を満たす
戻り値
プログラミング注意事項
オーバーライド
与えられた述語に適合する最も近いグラフィックの祖先を返します。
戻り値
このオブジェクトで
プログラミング注意事項
オーバーライド
戻り値
オーバーライド
この
戻り値
オーバーライド
グラフィック階層内における指定された祖先に対する
戻り値
オーバーライド
注意事項
グラフィック階層のルートにあるオブジェクトを基準とし、Visual の位置を取得します。
戻り値
注意事項
戻り値
プログラミング注意事項
start-bound と end-bound 間の、このグラフィック内に含まれる選択したテキストを取得します。
オーバーライド
グラフィック階層に含まれる指定上位オブジェクトの座標フレームでこのオブジェクトの左上隅のロケーションを見つけます。
戻り値
オーバーライド
注意事項
オブジェクトの実際の可視領域の境界ボックスを計算します。
オーバーライド
注意事項
この
戻り値
オーバーライド
位置 x、y にある目に見えるグラフィカルな子を規定します。
説明
戻り値
プログラミング注意事項
注意事項
この Graphic を参照する
戻り値
オーバーライド
説明
説明
オーバーライド
説明
このオブジェクトにオプションの値が変更したことを通知します。
プログラミング注意事項
オーバーライド
グラフィックにパジネーションを適用します。
戻り値
プログラミング注意事項
オーバーライド
{method public open {paginate
page-height:Distance,
next-page-height:Distance,
query-only?:bool
}:(PaginationState, PaginationQuality)
let pstate:PaginationState =
{self.get-pagination-state query-only?}
let bounds:GRect = pstate.bounds
let constant epsilon:Distance = epsilon-float * 1m
|| All done.
{if {abs bounds.descent - pstate.end-offset} < epsilon then
set pstate.start-offset = pstate.end-offset
{return pstate, PaginationQuality.complete}
}
|| No space left for the graphic.
{if page-height < epsilon then
{return pstate, PaginationQuality.clipped-outside}
}
let new-start-offset:Distance = pstate.min-end-offset
let new-end-offset:Distance =
{min new-start-offset + page-height, bounds.descent}
{return
{pstate.advance-pagination
new-start-offset,
new-end-offset,
quality-if-not-complete = PaginationQuality.poor
}
}
}
注意事項
ボーダーやマージンを含めたオブジェクトのセル全体を描画します。
プログラミング注意事項
オーバーライド
このオブジェクトで
プログラミング注意事項
オーバーライド
このオブジェクトで
プログラミング注意事項
オーバーライド
このオブジェクトに代わって別のオブジェクトをグラフィック階層に置きます。
戻り値
描画する
注意事項
プログラミング注意事項
オーバーライド
指定した
プログラミング注意事項
注意事項
オーバーライド
オーバーライド
表示されたオブジェクトの幾何形状が変更されていることを宣言し、必要な
説明
オーバーライド
この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。
戻り値
説明
オーバーライド
この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。通常このメソッドは、アプリケーション コードから直接呼び出しません。代わりに
戻り値
説明
オーバーライド
この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。
戻り値
説明
オーバーライド
注意事項
この Graphic 内か、その子の 1 つに現れるパターンの境界を返します。通常このメソッドは、アプリケーション コードから直接呼び出しません。代わりに
戻り値
説明
オーバーライド
プログラミング注意事項
注意事項
オーバーライド
このオブジェクトにレイアウト幅と高さを代入します。
説明
プログラミング注意事項
オーバーライド
パジネートできるように
注意事項
オーバーライド
2 つの グラフィカル オブジェクトの起点の間の (x、y) オフセットを計算します。
戻り値
注意事項