A SERVICE OF

logo

DesktopX 2.4 Developer’s Guide
_____________________________________________________________________________
_____________________________________________________________________________
Page 35
- “Charts and graphs for scripts” (DXChart.dll) – Used by scripts to show statistics in a
graphical way.
These plugins are distributed with the latest DesktopX2 distributions. If you have doubts about
which plugin to use, want to report bugs, or suggest new plugins or updates, feel free to write in
news.stardock.com/stardock.desktopx.
4.3 Child Objects
One of the best new DesktopX 2 features is the ability to configure Contained children. You find
that option in the Summary panel of Object Properties.
In DesktopX 1, child objects weren't actually ... children. That's because they could be placed
outside the parent's area, so the Parent relation was simply a z-order rule. i.e. a child is always
above its parent and when you drag the parent, children are dragged together.
DesktopX 2 introduces “real” children, called “Contained” children. The differences are:
- They are contained in the parent area, i.e. if you drag them outside, they will be clipped
and not be visible.
- Their coordinates are relative to the parent’s origin. This makes things more logical,
especially when using scripts, and fixes a lot of problems with screen resolution
adaptation, because only the parent will need to be repositioned when loading objects on
different screen resolutions, and children will be placed accordingly. The only limitation,
at the moment, is that they don't support rules to adapt themselves to changing parent
size. i.e. if they are inside a big parent "bar" object, as large as the screen, they won't be
repositioned accordingly when the resolution changes. You can workaround this by using
non-Contained panels, children of the Bar object, and have Contained children in them.
- They give a huge performance boost! If you have one parent with 20 contained children,
that'll count performance-wise as a unique object. This is especially important for Normal
and Always on top level objects. Alternatively, one parent and 20 non-contained children
will be like 21 separate objects. This significantly impacts on performance at Normal
level, and decrease it even at desktop level.
To summarize: use only non-contained children if you really need them outside the parent area
(but consider Grouping instead), or need some special behavior for multiple screen resolutions
support.
DesktopX2 will currently default to non-contained for backward compatibilty, but we are
moving in new builds to automatically enable Contained by default when possible. 'Set parent'
and 'Group' right-click actions already support this: if you select several objects and Group them,
DX will choose automatically the best settings for grouping and children. After that, you may
still want to check manually how they are configured.