YahooWidget@wiki

チュートリアル:XMLの概要-3

最終更新:

匿名ユーザー

- view
だれでも歓迎! 編集
<?xmlversion="1.0"encoding="{ .konファイルのエンコーディング }"?>
XML宣言では、どのようなXMLおよびエンコーディングを使用しているのかをパーサに通知します。
:XMLdeclaration which tells theparserwhat
kind of XML and encoding itisreading.

 <widget>: Widgetコードを開始する必須タグ
  Mandatory tag which starts theWidgetcode.
 <debug>:デバッグウィンドウのon/offを切り替える
   Turns the debug window on andoff,as well as givingoptionsfor how and when the debug is displayed.
 <version>: Widgetのバージョン
  Defines the version oftheWidget.
 <minimumVersion>Widgetが使用可能なエンジンのバージョン
  : Defines the version ofKonfabulatorthat theWidgetrequires to be able to run.

 <window>Widgetのサイズを決める必須のタグ。Windowの外側は一切表示されない。
: Mandatory tag which defines how largetodraw theWidget.Anything outside the window
bounds will be cut off.
    <name>:Windowの名前を定義する。これは後でJavascripが処理するときに使います。Definesthewindow's name. Used for later manipulationinJavaScript.
    <title>:Windowのタイトルを定義します。右クリックしたときなどのWidgetの名前としても使用されます。
Defines the window's title.Usedincontrol/right-clickfor displaying the Widget's name
to the user (About <title>) andinother areas.
    <height>Windowの高さをピクセル数で指定します。
    : Defines the window'sheightin pixels.
    <width>:Windowの幅をピクセル数で指定します。
    Defines the window's widthinpixels.
    <visible>:Widgetの可視・不可視をboolean値(0/1ortrue/false)で記述します。これは、あるデータを取得したりユーザが操作する前に何らかの処理を組み込む場合に有効です。
A boolean value (1 or 0, true or falsecanbe used in substitute) which defines whether the Widget can be seenornot.
This is useful if you need tofetchsomedataor run a couple of short processes before displaying the Widgetto theuser.

  <image>: Allows use of images in a Widget.
    <name>: Defines the image's name. Used forlatermanipulationinJavaScript.
    <hOffset>: Defines how many pixels to offsettheimagehorizontallyfrom the window's top-left
corner.
    <vOffset>: Defines how many pixels to offsettheimageverticallyfrom the window's top-left
corner.
    <hRegistrationPoint>: Defines the X-pixel coordinatefromwhichtobase things like offset and
rotation. This is set to 0 by default (The left side of the image).
    <vRegistrationPoint>: Defines the Y-pixel coordinatefromwhichtobase things like offset and
rotation. This is set to 0 by default (The top edge of the image).
    <rotation>: Defines how far to rotate an image indegrees.
    <opacity>: A value from 0 to 255 which defines theopacityoftheimage. Percentile values can
also be used.
    <onMouseDown>: Used to define what happens themousebuttonispressed on the image
object.
    <onMouseUp>: Used to define what happens themousebuttonisreleased on the image
object. This is favored over the onMouseDown action.

  <text>: Allows use of text in a Widget.
    <name>: Defines the text's name. Used forlatermanipulationinJavaScript.
    <data>: Defines what the text says.
    <hOffset>: Defines how many pixels to offsetthetexthorizontallyfrom the window's top-left
corner. Affected by the <alignment> tag.
    <vOffset>: Defines how many pixels to offsetthetextverticallyfrom the window's top-left
corner. Uses the text's baseline for offset as opposed to the top edge.
    <alignment>: Values of "left", "center", and "right"areusedhereto define where the text draws
from.
    <color>: Defines the color of the text inahexadecimalvalue(examples: #000000 is black,
#8000FF is violet, #FFFFFF is white).
    <font>: Defines the font used in the text.
    <size>: The font size in point units.
    <opacity>: A value from 0 to 255 which defines the opacityofthetext. Percentile values can
also be used.
    <onMouseDown>: Used to define what happens the mousebuttonispressed on the text
object.
    <onMouseUp>: Used to define what happens the mousebuttonisreleased on the text object.
This is favored over the onMouseDown action.

  <textarea>: Allows use of text input in a Widget.
    <name>: Defines the textarea's name. Used forlatermanipulationin JavaScript.
    <hOffset>: Defines how many pixels to offsettheinputhorizontally from the window's top-left
corner. Affected by the <alignment> tag.
    <vOffset>: Defines how many pixels to offset theinputverticallyfrom the window's top-left
corner. Uses the text's baseline for offset as opposed to the top edge.
    <lines>: Used to define how many lines are displayedatatime.
    <columns>: Defines how wide to make the text inputbeforemoretext would cause the input to
scroll.
    <color>: Defines the color of the text in ahexadecimalvalue(examples: #000000 is black,
#8000FF is violet, #FFFFFF is white).
    <font>: Defines the font used in the input.
    <bgColor>: Defines the color of the input backgroundinahexadecimal value (examples:
#000000 is black, #8000ff is violet, #ffffff is white).
    <bgopacity>: A value from 0 to 255 which defines theopacityofthe input background.
Percentile values can also be used.
    <onKeyPress>: Used to define what happens each time akeyispressed.

  <action trigger="(Some event here)">: Lets events happenwhentheWidget is first loaded, when it
is focused, after the computer is awaken from sleep, when itspreferencesarechanged, and more.
Can be used multiple times for different events!

  <about-box>: Works like the <src> tag in an imageobject,butfor an about box. Use multiple to have
multiple about boxes.

Examine "The Weather.kon" in your text editor and look at thedifferenttagsused to
get an idea of what kinds of objects are immediately available for usewhenyouwrite
a Widget. When you are done, close "The Weather.kon".

There are many, many more tags than are listed here! PleasechecktheKonfabulator Reference
Manual for other objects, attributes, and action triggers if you want tofindoutmore of what a Widget
can display and do.

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

目安箱バナー