OLIT と Solaris Motif のツールキットは、類似する機能を持つ多数の共通ウィジェットとガジェットをサポートし、それぞれのツールキットではより固有の多数のウィジェットをサポートします。あるウィジェットが一方のツールキットには実装されているが他方には実装されていない場合は、実装されていないツールキット内で複数のウィジェットを使用すると同等のオブジェクトを構築できる場合が多いです。
表 5-4 は共通ウィジェット名と、各ツールキット内のそのウィジェットに対応する実際のクラス名を示します
表 5-4 共通ウィジェットのマッピング
OLIT のクラス名 |
Solaris Motif のクラス名 |
---|---|
BulletinBoard |
XmBulletinBoard |
DrawArea |
XmDrawingArea |
ExclusiveChoice + RectButtons |
XmRowColumn + XmToggleButtons (ラジオボックス) |
Form |
XmForm |
Manager |
XmManager |
MenuButton |
DtMenuButton (OpenWindows 環境ではアクセスできない) |
NoticeShell |
XmDialogShell + XmMessageBox |
AbbrevMenuButton |
XmRowColumn (オプションメニュー) |
PopupWindowShell |
XmDialogShell |
NonExclusiveRectButton |
XmRowColumn + XmToggleButtons (チェックボックス) |
PopupMenuShell |
XmMenuShell |
Primitive |
XmPrimitive |
OblongButton |
XmPushButton |
ControlArea |
XmRowColumn |
Scrollbar |
XmScrollBar |
ScrollingList |
XmList + XmScrolledWindow |
ScrolledWindow |
XmScrolledWindow |
Slider |
XmScale |
StaticText |
XmLabel |
TextEdit |
XmText |
TextField |
XmTextField |
RectButton |
XmToggleButton |
この節では、Solaris Motif に固有のウィジェットについて簡単に説明します。
これらのウィジェットのうち、次のウィジェット以外は、OpenWindows 環境での Motif 開発にも使用できます。
DtTerm、DtEditor、DtComboBox、DtSpinBox、DtMenuButton
このウィジェットは、ANSI X3.64-1979 スタイルの端末エミュレータ (特に DEC VT220 のような拡張機能付き端末) のエミュレートに必要な機能を提供します。
このウィジェットは、カット&ペーストなどの編集サービス用のプログラムインタフェースを提供します。
このウィジェットはテキストフィールドと、そのテキストフィールドに有効な選択肢のリストを提供するリストウィジェットとを組み合わせたものです。このリストから項目を選択すると、そのリスト項目がテキストフィールドに自動的に表示されます。
このウィジェットは、任意の TextField を増減させる便利なユーザインタフェースコントロールです。
このウィジェットは、XmCascadeButton ウィジェットのメニュー階層化機能を補足するコマンドウィジェットです (OLIT には独自のメニューボタンウィジェットがあり、その機能は DtMenuButton と同等です)。
このボタンは、矢印ラベルを表示するプリミティブプッシュボタンウィジェットです。
これはコマンドボックスを構築し、ユーザが選択したコマンドとコマンドヒストリを管理するマネージャウィジェットです。
このボタンは、ラベルをプログラムで描画できるプリミティブプッシュボタンです。
このマネージャウィジェットは、1 つの子に親を設定して、その子を枠で囲むために使用します。
このガジェットは、読み専用テキストのための低オーバーヘッドオブジェクトです。
このマネージャウィジェットは、メニューバー、コマンド領域、作業領域をサポートします。
このマネージャウィジェットは、ウィンドウ内にサイズ変更可能な区画を実装します。
このウィジェットボックスを使用すると、通常のダイアログボックス内のリストから項目を 1 つ選択できます。
このウィジェットは、標準的なファイルの選択方法 (通常はアプリケーションの読み書きのため) を提供します。
libDtWidget ライブラリには DtComboBox、DtSpinBox、DtMenuButton、DtEditor ウィジェットが入っていて、次のライブラリに直接依存します。
この節では、OLIT に固有のウィジェットについて簡単に説明します。
このプリミティブウィジェットによって、ドラッグ&ドロップ操作のソース側と出力側が実装されます。
これらの特殊ウィジェットは、1 つのウィジェットのコンテキスト内で任意の数のサブオブジェクトを管理します。多数のサブ項目が入ったメニューや選択オブジェクトを実装すると、メモリを大幅に節約できます。
このマネージャウィジェットによって、フローティングフッタ領域を持つウィンドウが自動的にサポートされます。
このマネージャウィジェットを使用すると、その子に相対サイズの制約を設けることができます。
このプリミティブウィジェットを使用すると、サブクラスに入れなくても動作をカスタマイズできます。