X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3-doc.git;a=blobdiff_plain;f=objects.tex;h=725b7f51f2d1c5dd6c61c90e929836afc868796f;hp=5a5b04f54ad7de29a862d98e21d4699364f523e5;hb=428266c577f55bd77cf036ed0d2af379613471e4;hpb=a35ba2541b8601953ae94f779a85ae70de19cd11 diff --git a/objects.tex b/objects.tex index 5a5b04f..725b7f5 100644 --- a/objects.tex +++ b/objects.tex @@ -5,7 +5,7 @@ While Ion does not not have a truly object-oriented design \footnote{the author doesn't like such artificial designs}, things that appear on the computer screen are, however, quite -naturally expressed as such ''objects''. Therefore Ion implements +naturally expressed as such ``objects''. Therefore Ion implements a rather primitive OO system for these screen objects and some other things. @@ -21,7 +21,7 @@ basic relations. For simplicity we consider only the essential-for-basic-configuration Ioncore, \file{mod\_tiling} and \file{mod\_query} classes. -See Appendix \ref{app:fullhierarchy} for the full class hierachy visible +See Appendix \ref{app:fullhierarchy} for the full class hierarchy visible to Lua side. \subsection{Class hierarchy} @@ -46,16 +46,16 @@ implement. | |-->WWindow | | |-->WMPlex | | | |-->WFrame - | | | |-->WScreen - | | | |-->WRootWin - | | |-->WInput (mod_query) + | | | `-->WScreen + | | | `-->WRootWin + | | `-->WInput (mod_query) | | |-->WEdln (mod_query) - | | |-->WMessage (mod_query) + | | `-->WMessage (mod_query) | |-->WGroup | | |-->WGroupWS - | | |-->WGroupCW - | |-->WTiling (mod_tiling) - |-->WSplit (mod_tiling) + | | `-->WGroupCW + | `-->WTiling (mod_tiling) + `-->WSplit (mod_tiling) \end{verbatim} \caption{Partial Ioncore, \file{mod\_tiling} and \file{mod\_query} class hierarchy.} @@ -73,7 +73,7 @@ The core classes: screen. Each object of type \type{WRegion} has a size and position relative to the parent \type{WRegion}. While a big part of Ion operates on these instead of more specialised classes, \type{WRegion} - is a ''virtual'' base class in that there are no objects of ''pure'' + is a ``virtual'' base class in that there are no objects of ``pure'' type \type{WRegion}; all concrete regions are objects of some class that inherits \type{WRegion}. @@ -85,27 +85,26 @@ The core classes: internal objects having an X window associated to them (\type{WClientWins} also have X windows associated to them). + \item[\type{WMPlex}] is a base class for all regions that ``multiplex'' + other regions. This means that of the regions managed by the multiplexer, + only one can be displayed at a time. + + \item[\type{WScreen}]\indextype{WScreen} is an instance of \type{WMPlex} + for screens. + \item[\type{WRootWin}]\indextype{WRootWin} is the class for root windows\index{root window} of X screens\index{screen!X}. - Note that an ''X screen'' or root window is not necessarily a - single physical screen\index{screen!physical} as a root window - may be split over multiple screens when hacks such as + It is an instance of \type{WScreen}. + Note that an ``X screen'' or root window is not necessarily a + single physical screen\index{screen!physical} as a root window + may be split over multiple screens when ugly hacks such as Xinerama\index{Xinerama} are used. (Actually there can be only - one root window when Xinerama is used.) + one root window when Xinerama is used.) - \item[\type{WMPlex}] is a base class for all regions that''multiplex'' - other regions. This means that of the regions managed by the multiplexer, - only one can be displayed at a time. Classes that inhereit \type{WMPlex} - include screens and frames. - - \item[\type{WScreen}]\indextype{WScreen} is the class for objects - corresponding to physical screens. Screens may share a root - window when the Xinerama extension is used as explained above. - \item[\type{WFrame}]\indextype{WFrame} is the class for frames. - While most Ion's objects have no graphical presentation, frames basically - add to \type{WMPlex}es the decorations around client windows - (borders, tabs). + While most Ion's objects have no graphical presentation, frames + basically add to \type{WMPlex}es the decorations around client + windows (borders, tabs). \item[\type{WGroup}]\indextype{WGroup} is the base class for groups. Particular types of groups are workspaces @@ -130,16 +129,16 @@ Classes implemented by the \file{mod\_query} module: \begin{description} \item[\type{WInput}]\indextype{WInput} is a virtual base class for the two classes below. - \item[\type{WEdln}]\indextype{WEdln} is the class for the ''queries'', + \item[\type{WEdln}]\indextype{WEdln} is the class for the ``queries'', the text inputs that usually appear at bottoms of frames and sometimes - screens. Queries are the functional equivalent of ''mini buffers'' in + screens. Queries are the functional equivalent of ``mini buffers'' in many text editors. \item[\type{WMessage}]\indextype{WMessage} implements the boxes for warning and other messages that Ion may wish to display to the user. These also usually appear at bottoms of frames. \end{description} -There are also some other ''proxy'' classes that do not refer +There are also some other ``proxy'' classes that do not refer to objects on the screen. The only important one of these for basic configuration is \type{WMoveresMode} that is used for binding callbacks in the move and resize mode. @@ -163,15 +162,14 @@ Figure \ref{fig:parentship}. \end{htmlonly} \begin{verbatim} WRootWins - |-->WScreens - |-->WGroupWSs - |-->WTilings - |-->WClientWins in full screen mode - |-->WFrames - |-->WGroupCWs - |-->WClientWins - |-->WFrames for transients - |-->a possible WEdln or WMessage + |-->WGroupWSs + |-->WTilings + |-->WClientWins in full screen mode + `-->WFrames + |-->WGroupCWs + |-->WClientWins + |-->WFrames for transients + `-->a possible WEdln or WMessage \end{verbatim} \caption{Most common parent--child relations} \label{fig:parentship} @@ -184,9 +182,8 @@ focusing and displaying of the managed regions. Indeed the manager---managed relationship gives a better picture of the logical ordering of objects on the screen. Again, there are generally few limits, but the most common hierarchy is given in Figure \ref{fig:managership}. Note that sometimes -the parent and manager are the same object and not all objects may have -a manager (e.g. the dock in the dock module at the time of writing this) -but all have a parent--a screen if not anything else. +the parent and manager are the same object and not all regions may have +a manager, but all have a parent--a screen if not anything else. \subsubsection{Manager--managed relations} @@ -196,20 +193,19 @@ but all have a parent--a screen if not anything else. \end{htmlonly} \begin{verbatim} WRootWins - |-->WScreens - |-->WGroupCWs for full screen WClientWins - | |-->WClientWins - | |-->WFrames for transients (dialogs) - | |--> WClientWin - |-->WGroupWSs for workspaces - | |-->WTiling - | | |-->WFrames - | | | |-->WGroupCWs (with contents as above) - | | |-->possibly a WStatusBar or WDock - | |-->WFrames for floating content - | |-->possibly a WEdln, WMessage or WMenu - | |-->possibly a WStatusBar or WDock (if no tiling) - |-->WFrames for sticky stuff, such as the scratchpad + |-->WGroupCWs for full screen WClientWins + | |-->WClientWins + | `-->WFrames for transients (dialogs) + | `--> WClientWin + |-->WGroupWSs for workspaces + | |-->WTiling + | | |-->WFrames + | | | `-->WGroupCWs (with contents as above) + | | `-->possibly a WStatusBar or WDock + | |-->WFrames for floating content + | |-->possibly a WEdln, WMessage or WMenu + | `-->possibly a WStatusBar or WDock (if no tiling) + `-->WFrames for sticky stuff, such as the scratchpad \end{verbatim} \caption{Most common manager--managed relations} \label{fig:managership}