私が触り始めたのがそのバージョンからということで、 本稿で対象としているのはMotif 2.1.xです。
以下のクラスについてはMotifではなくイントリンシクスで提供されるものです。 参考のために挙げてあります。
ウィジェットクラス | 継承クラス | Cヘッダファイル |
---|---|---|
RectObj | なし | X11/RectObj.h |
Core | RectObj | X11/Core.h |
Composite | Core | X11/Composite.h |
Constraint | Composite | X11/Constraint.h |
Shell | Composite | X11/Shell.h |
OverrideShell | Shell | X11/Shell.h |
WMShell | Shell | X11/Shell.h |
VendorShell | WMShell | X11/Shell.h |
Transient | VendorShell | X11/Vendor.h |
TopLevelShell | VendorShell | X11/Shell.h |
ApplicationShell | TopLevelShell | X11/Shell.h |
SessionShell | ApplicationShell | X11/Shell.h |
シェルはウィンドウマネージャ(WM;Window Manager)と 通信する上で重要な役目のあるウィジェットです。
ウィジェットクラス | 継承クラス | Cヘッダファイル |
---|---|---|
VendorShell | WMShell | Xm/VendorS.h |
XmGrabShell | VendorShell | Xm/GrabShell.h |
XmDialogShell | TransientShell | Xm/DialogS.h |
XmMenuShell | OverrideShell | Xm/MenuS.h |
XmPrintShell | ApplicationShell | Xm/Print.h |
その目的のために用意されているから、ある意味当然なのですが、 Motifでは独自のVendorShellが利用されます。 具体的にはこれに X Input Method のためのフックのコードが含まれているみたいです。
プリミティブはそれ自体でGUI(Graphical User Interface)を提供する部品です。 XmPrimitiveはMotifの都合でCoreのラッパーとして用意したものでしょうか。
ウィジェットクラス | 継承クラス | Cヘッダファイル |
---|---|---|
XmPrimitive | Core | Xm/Primitive.h |
XmArrowButton | XmPrimitive | Xm/ArrowB.h |
XmLabel | XmPrimitive | Xm/Label.h |
XmCascadeButton | XmLabel | Xm/CascadeB.h |
XmDrawnButton | XmLabel | Xm/DrawnB.h |
XmPushButton | XmLabel | Xm/PushB.h |
XmToggleButton | XmLabel | Xm/ToggleB.h |
XmList | XmPrimitive | Xm/List.h |
XmSash | XmPrimitive | なし |
XmScrollBar | XmPrimitive | Xm/ScrollBar.h |
XmSeparator | XmPrimitive | Xm/Separator.h |
XmText | XmPrimitive | Xm/Text.h |
XmTextField | XmPrimitive | Xm/TextF.h |
XmSashはXmPanedWindowの内部で利用されているウィジェットなので、 これを生成、操作するためのAPIは存在しません。
ガジェットはXサーバ側のリソースをなるべく消費しないように工夫された (代わりにわクライアント側が必要になりますが…) 対応するプリミティブに代わるウィジェットです。
ウィジェットクラス | 継承クラス | Cヘッダファイル |
---|---|---|
XmGadget | RectObj | Xm/Gadget.h |
XmArrowButtonGadget | XmGadget | Xm/ArrowBG.h |
XmLabelGadget | XmGadget | Xm/LabelG.h |
XmCascadeButtonGadget | XmLabelGadget | Xm/CascadeBG.h |
XmPushButtonGadget | XmLabelGadget | Xm/PushBG.h |
XmToggleButtonGadget | XmLabelGadget | Xm/ToggleBG.h |
XmSeparatorGadget | XmGadget | Xm/SeparatoG.h |
XmIconGadget | XmGadget | Xm/IconG.h |
XmIconHeader | XmIconGadget | Xm/IconH.h |
マネージャはそれぞれのポリシーでプリミティブの配置を管理するウィジェットです。
Athenaと違って、MotifではXmManagerをコンストレイントのサブクラスとし、 さらに全てのマネージャをXmManagerのサブクラスとする形で実装されています。 プリミティブと同様コンストレイントのラッパーとして捉えて差し支えないと思います。
ウィジェットクラス | 継承クラス | Cヘッダファイル |
---|---|---|
XmManager | Constraint | Xm/Manager.h |
XmDrawingArea | XmManager | Xm/DrawingA.h |
XmClipWindow | XmDrawingArea | なし |
XmFrame | XmManager | Xm/Frame.h |
XmPanedWindow | XmManager | Xm/PanedW.h |
XmRowColumn | XmManager | Xm/RowColumn.h |
XmScale | XmManager | Xm/Scale.h |
XmScrolledWindow | XmManager | Xm/ScrolledW.h |
XmMainWindow | XmScrolledWindow | Xm/MainW.h |
XmComboBox | XmManager | Xm/ComboBox.h |
XmContainer | XmManager | Xm/Container.h |
XmNotebook | XmManager | Xm/Notebook.h |
XmSpinBox | XmManager | Xm/SpinB.h |
XmSimpleSpinBox | XmSpinBox | Xm/SSpinB.h |
XmBulletinBoard | XmManager | Xm/BulletinB.h |
XmForm | XmBulletinBoard | Xm/Form.h |
XmMessageBox | XmBulletinBoard | Xm/MessageB.h |
XmSelectionBox | XmBulletinBoard | Xm/SelectionB.h |
XmCommand | XmSelectionBox | Xm/Command.h |
XmFileSelectionBox | XmSelectionBox | Xm/FileSB.h |
XmClipWindow の存在は無視できないのですが、 通常 XmScrolledWindow の内部で自動的に生成、利用されているので 普段は気にすることはないでしょう。
ヘッダファイルを見ながら作りました。 おかげでUILを使う上で困らないぐらい覚えられました。 なにせ XmCreateYYYY に対応する形でUILで指示するクラス名が存在するのですから。
基本的に目視によるものなので(さすがに切り貼りはテキストエディタで行ないましたが…) 苦労しました。 もしかしたら抜けているところがあるかも知れません。
生成関数 | ウィジェットクラス名 | クラス | ヘッダファイル |
---|---|---|---|
XmCreateArrowButton | XmArrowButton | xmArrowButtonWidgetClass | ArrowB.h |
XmCreateArrowButton | XmArrowButton | xmArrowButtonWidgetClass | ArrowB.h |
XmCreateArrowButtonGadget | XmArrowButtonGadget | xmArrowButtonGadgetClass | ArrowBG.h |
XmCreateBulletinBoard | XmBulletinBoard | xmBulletinBoardWidgetClass | BulletinB.h |
XmCreateBulletinBoardDialog | XmBulletinBoard | xmBulletinBoardWidgetClass | BulletinB.h |
XmCreateCascadeButton | XmCascadeButton | xmCascadeButtonWidgetClass | CascadeB.h |
XmCreateCascadeButtonGadget | XmCascadeButtonGadget | xmCascadeButtonGadgetClass | CascadeBG.h |
XmCreateComboBox | XmComboBox | xmComboBoxWidgetClass | ComboBox.h |
XmCreateDropDownComboBox | XmComboBox | xmComboBoxWidgetClass | ComboBox.h |
XmCreateDropDownList | XmComboBox | xmComboBoxWidgetClass | ComboBox.h |
XmCreateCommand | XmCommand | xmCommandWidgetClass | Command.h |
XmCreateCommandDialog | XmCommand | xmCommandWidgetClass | Command.h |
XmCreateContainer | XmContainer | xmContainerWidgetClass | Container.h |
XmCreateDialogShell | XmDialogShell | xmDialogShellWidgetClass | DialogS.h |
XmDisplay | xmDisplayClass | Display.h | |
XmDragContext | xmDragContextClass | DragC.h | |
XmCreateDragIcon | XmDragIcon | xmDragIconObjectClass | DragIcon.h |
xmDragOverShellWidgetClass | DragOverS.h | ||
XmCreateDrawingArea | XmDrawingArea | xmDrawingAreaWidgetClass | DrawingA.h |
XmCreateDrawnButton | XmDrawnButton | xmDrawnButtonWidgetClass | DrawnB.h |
XmDropSite | xmDropSiteManagerObjectClass | DropSMgr.h | |
XmDropTransfer | xmDropTransferObjectClass | DropTrans.h | |
XmCreateFileSelectionBox | XmFileSelectionBox | xmFileSelectionBoxWidgetClass | FileSB.h |
XmCreateFileSelectionDialog | XmFileSelectionBox | xmFileSelectionBoxWidgetClass | FileSB.h |
XmCreateForm | XmForm | xmFormWidgetClass | Form.h |
XmCreateFormDialog | XmForm | xmFormWidgetClass | Form.h |
XmCreateFrame | XmFrame | xmFrameWidgetClass | Frame.h |
XmGadget | xmGadgetClass | Gadget.h | |
xmGrabShellWidgetClass | GrabShell.h | ||
XmCreateIconGadget | XmIconGadget | xmIconGadgetClass | IconG.h |
xmIconHeaderClass | IconH.h | ||
XmCreateLabel | XmLabel | xmLabelWidgetClass | Label.h |
XmCreateLabelGadget | XmLabelGadget | xmLabelGadgetClass | LabelG.h |
XmCreateList | XmList | xmListWidgetClass | List.h |
XmCreateScrolledList | XmList | xmListWidgetClass | List.h |
XmCreateMainWindow | XmMainWindow | xmMainWindowWidgetClass | MainW.h |
XmManager | xmManagerWidgetClass | Manager.h | |
XmCreateMenuShell | XmMenuShell | xmMenuShellWidgetClass | MenuShell.h |
XmCreateMessageBox | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateErrorDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateInformationDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateMessageDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateQuestionDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateTemplateDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateWarningDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateWorkingDialog | XmMessageBox | xmMessageBoxWidgetClass | MessageB.h |
XmCreateNotebook | XmNotebook | xmNotebookWidgetClass | Notebook.h |
XmCreatePanedWindow | XmPanedWindow | xmPanedWindowWidgetClass | PanedW.h |
XmPrimitive | xmPrimitiveWidgetClass | Primitive.h | |
XmPrintShell | xmPrintShellWidgetClass | Print.h | |
xmProtocolObjectClass | Protocols.h | ||
XmCreatePushButton | XmPushButton | xmPushButtonWidgetClass | PushB.h |
XmCreatePushButtonGadget | XmPushButtonGadget | xmPushButtonGadgetClass | PushBG.h |
XmCreateRowColumn | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateMenuBar | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateOptionMenu | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreatePopupMenu | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreatePulldownMenu | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateRadioBox | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateSimpleCheckBox | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateSimpleMenuBar | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateSimpleOptionMenu | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateSimplePopupMenu | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateSimplePulldownMenu | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateSimpleRadioBox | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateWorkArea | XmRowColumn | xmRowColumnWidgetClass | RowColumn.h |
XmCreateScale | XmScale | xmScaleWidgetClass | Scale.h |
XmScreen | xmScreenClass | Screen.h | |
XmCreateScrollBar | XmScrollBar | xmScrollBarWidgetClass | ScrollBar.h |
XmCreateScrolledWindow | XmScrolledWindow | xmScrolledWindowWidgetClass | ScrolledW.h |
XmCreateSelectionBox | XmSelectionBox | xmSelectionBoxWidgetClass | SelectioB.h |
XmCreateSelectionDialog | XmSelectionBox | xmSelectionBoxWidgetClass | SelectioB.h |
XmCreatePromptDialog | XmSelectionBox | xmSelectionBoxWidgetClass | SelectioB.h |
XmCreateSeparatorGadget | XmSeparatorGadget | xmSeparatorGadgetClass | SeparatoG.h |
XmCreateSeparator | XmSeparator | xmSeparatorWidgetClass | Separator.h |
XmCreateSpinBox | XmSpinBox | xmSpinBoxWidgetClass | SpinB.h |
XmCreateSimpleSpinBox | XmSimpleSpinBox | xmSimpleSpinBoxWidgetClass | SSpinB.h |
XmCreateText | XmText | xmTextWidgetClass | Text.h |
XmCreateScrolledText | XmText | xmTextWidgetClass | Text.h |
XmCreateTextField | XmTextField | xmTextFieldWidgetClass | TextF.h |
XmCreateToggleButton | XmToggleButton | xmToggleButtonWidgetClass | ToggleB.h |
XmCreateToggleButtonGadget | XmToggleButtonGadget | xmToggleButtonGadgetClass | ToggleBG.h |
vendorShellWidgetClass | VendorS.h |