summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/README.md58
-rw-r--r--xfa/fwl/theme/README.md29
2 files changed, 87 insertions, 0 deletions
diff --git a/xfa/fwl/README.md b/xfa/fwl/README.md
new file mode 100644
index 0000000000..9285e89345
--- /dev/null
+++ b/xfa/fwl/README.md
@@ -0,0 +1,58 @@
+xfa/fwl is a Widget Library for XFA Forms.
+
+CFWL_Widget is the base class that widget classes extend. The derived widget
+classes are both controllers and renderers for each widget. The hierarchy is:
+
+* CFWL_Widget
+ * CFWL_Form
+ * CFWL_FormProxy
+ * CFWL_ComboBoxProxy
+ * CFWL_Caret
+ * CFWL_CheckBox
+ * CFWL_ComboBox
+ * CFWL_DateTimePicker
+ * CFWL_Edit
+ * CFWL_Barcode
+ * CFWL_ComboEdit
+ * CFWL_DateTimeEdit
+ * CFWL_ListBox
+ * CFWL_ComboList
+ * CFWL_MonthCalendar
+ * CFWL_PictureBox
+ * CFWL_PushButton
+ * CFWL_ScrollBar
+ * CFWL_SpinButton
+
+These CFWL widgets are instantiated by and closely related to the CXFA classes
+in the xfa/fxfa directory. See xfa/fxfa/README.md.
+
+CFWL_Widget implements IFWL_WidgetDelegate through which it receives messages,
+events and draw calls.
+
+Messages consist of user input for a widget to handle. Each type of message is
+identified by an enum value in Message::Type and has its own class derived from
+the base CFWL_Message.
+
+* CFWL_Message
+ * CFWL_MessageKey
+ * CFWL_MessageKillFocus
+ * CFWL_MessageMouse
+ * CFWL_MessageMouseWheel
+ * CFWL_MessageSetFocus
+
+Events are originated in the widgets and are then handled by other CFWL_Widget
+and CXFA classes.
+
+* CFWL_Event
+ * CFWL_EventCheckWord
+ * CFWL_EventMouse
+ * CFWL_EventScroll
+ * CFWL_EventSelectChanged
+ * CFWL_EventTextChanged
+ * CFWL_EventValidate
+
+The widgets use IFWL_ThemeProvider for rendering everything, calling
+DrawBackground() and DrawText() and passing many options in their parameters,
+respectively of types CFWL_ThemeBackground and CFWL_ThemeText. See
+xfa/fwl/theme/README.md.
+
diff --git a/xfa/fwl/theme/README.md b/xfa/fwl/theme/README.md
new file mode 100644
index 0000000000..7a69932929
--- /dev/null
+++ b/xfa/fwl/theme/README.md
@@ -0,0 +1,29 @@
+xfa/fwl/theme contains code for rendering XFA widgets.
+
+TP stands for Theme Part.
+
+CFWL_WidgetTP contains much of the code common to more than one widget.
+
+The other CFWL_TP classes derive from it and know how to draw the pieces
+specific to their respective widget.
+
+The inheritance hierarchy for this directory is:
+
+* CFWL_WidgetTP
+ * CFWL_BarcodeTP
+ * CFWL_CaretTP
+ * CFWL_CheckboxTP
+ * CFWL_ComboBowTP
+ * CFWL_DateTimePickerTP
+ * CFWL_EditTP
+ * CFWL_ListBoxTP
+ * CFWL_MonthCalendarTP
+ * CFWL_PictureBoxTP
+ * CFWL_PushButtonTP
+ * CFWL_ScrollBarTP
+
+All these widget TP classes are composed into CXFA_FWLTheme, which implements
+IFWL_ThemeProvider (and is the only class that does). CXFA_FWLTheme receives
+DrawBackground() calls from CFWL widgets to draw themselves and routes them to
+the TP (Theme Part) corresponding to that widget.
+