Resumo do conteúdo contido na página número 1
Stardock
Developer’s Guide
Version 2.4
th
December 14 2004
Copyright © 2004 Stardock.net, Inc.
Resumo do conteúdo contido na página número 2
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ Contents _________________ 1 Introduction........................................................................................................................... 4 1.1 ABOUT THIS GUIDE.......................................................................................................................4 2 Development Basics ................................................
Resumo do conteúdo contido na página número 3
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ Shadows and Glows .................................................................................................. 20 Color ........................................................................................................................ 20 Sound........................................................................................................................ 20 New
Resumo do conteúdo contido na página número 4
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 4.11 NEVER USE THE SLEEP METHOD IN SCRIPTS ..............................................................................38 4.12 ONLY PACKAGE USEFUL OBJECTS..............................................................................................38 1 Introduction ________________________ 1.1 About this guide Having mastered the use of DesktopX, you are probably ready
Resumo do conteúdo contido na página número 5
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 2 Development Basics _____________________________________ 2.1 Creating a theme If you are planning to start working on DesktopX objects it is often easier to start with a blank canvas so you aren't distracted by other objects on your desktop. The easiest way to do this is to select ‘New Theme’ from the ‘Theme’ tab on the DesktopX configuration dialog that you were introd
Resumo do conteúdo contido na página número 6
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ to reduce the desktop by. Once you have done this then applications (when maximized) will not intrude into this space so your objects are visible. Resolutions There is also a 'Resolutions' button so you can specify the screen resolutions your theme is optimally designed to work with. DesktopX provides some advanced features to allow you to define how individual objects positi
Resumo do conteúdo contido na página número 7
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ you can add the font as a custom file and it will be distributed with your theme and automatically be installed. Theme Information When you come to save your theme you can enter some information about the theme to inform the user what it contains and give credit to anyone who has supported you. _____________________________________________________________________________
Resumo do conteúdo contido na página número 8
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 2.2 Creating an Object OK, so we've done the background work and now it's down to the good stuff. The majority of the rest of the Developers Guide is dedicated to objects and all that they can do. What you'll be pleased to know is that the actual creation of a basic object is very simple. There are several ways that you can create a new object. On the DesktopX Settings dialo
Resumo do conteúdo contido na página número 9
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 2.3 Object Types To change the object type, click the 'Change' button next to where it says 'Type of object' in the ‘Object properties’ dialogue. This will present you with a list of the other basic object types you can use without having to even consider plugins or script. Once a type is defined, the activity associated with that object type will occur when an object is cl
Resumo do conteúdo contido na página número 10
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ Shortcut A ‘Shortcut’ allows the object to link to a file or a folder on your machine. If you choose a file (e.g. Notepad.exe) you can add arguments to that link. For example, if the file shortcut was Notepad.exe, you could add the argument ‘c:\mydoc.txt’ which would launch Notepad and then open the file ‘mydoc.txt’. You can also how that application will appear when launched (e
Resumo do conteúdo contido na página número 11
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ Object Controller Objects can interact with other objects and this is a way to carry out some of the most common of these interactions. An individual object or groups of objects can be defined as 'popups', which means that they can be shown on screen only when they are required. We will define how to do this later, but at the moment it is enough to know that you can select one
Resumo do conteúdo contido na página número 12
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ System Tray Once you have understood the taskbar type, the 'System Tray' class is easy, as it uses a subset of these options that creates an object to display the icons in your system tray. System The 'System' class allows you to access some of the other standard Windows functionality. Selecting this class provides you with a dropdown list of items from which you can select.
Resumo do conteúdo contido na página número 13
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 2.4 Other Object Basics The object is now created in a rough form, but now is an opportunity to run through the other basic elements relating to objects before we move onto more complex things. Labels The first thing you can do is to add a text label to your object. You simply do this by entering the label text into the 'Label' box at the top of the General tab. If you wa
Resumo do conteúdo contido na página número 14
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ The Object Navigator will show you all your objects, relationships they have with other objects, position and size, z-order and images used. It is not designed to tell you everything, but rather a summary reference that you can use to identify and tweak objects. There are certain elements of an object’s properties that you can edit directly via the Object Navigator for speed; the
Resumo do conteúdo contido na página número 15
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 2.5 Exporting Widgets, Objects and Themes OK, you've learnt the basics of creating objects, but now you need to know how to export Objects and Themes. First thing to note quickly, is that though it's a great idea to save your work frequently, every time you click OK or Apply on a dialog, the current work on the desktop will be saved and then reloaded next time DesktopX is re
Resumo do conteúdo contido na página número 16
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ Remember that if you create a normal “.dxpack” you can upload your work to the WinCustomize website. By doing this others can benefit from your creations and you may get feedback from users that helps you develop in the future. DesktopX Pro users have a third export option. This is also for the creation of a widget, but this widget will run as a standard program on any machine w
Resumo do conteúdo contido na página número 17
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ 3 Enhancing Objects ____________________________________ 3.1 Object Appearance & States OK, well done, you've conquered the basics. Now let’s start making the objects look cool! There's no getting away from it - this section is a big one in which you will learn a lot! Don't worry though, you can take it bit by bit, and after this section you will be well armed to creat
Resumo do conteúdo contido na página número 18
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ transparency information with the file, which means that although the saved image may be a rectangle, the actual image that you see on your screen can be any shape you want, because the background is visible when transparent areas of the object exist. This image on the left is a PNG image created in Macromedia Fireworks with a checkerboard effect showing the transparency. When
Resumo do conteúdo contido na página número 19
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ Image sizing and offsets Once you have selected the image to use you can distort the image by entering a width and height for the image in the appropriate boxes. DesktopX is not content with sizing objects in such a brutal fashion, so provides an advanced tab to allow you to resize the image more intelligently. Clicking the 'Advanced' button brings up a new dialog. This allows
Resumo do conteúdo contido na página número 20
DesktopX 2.4 Developer’s Guide _____________________________________________________________________________ The final option allows you to vary opacity as the object animates but we will discuss that in the appropriate section. Shadows and Glows The ‘Shadow/Glow’ tab allows you to apply either a drop shadow on the object giving it the appearance of floating above the desktop, or a glow surrounding the object. If you click “Enabled” button you can specify four parameters to customi