Calmira Source Code

This page will showcase the codebase of Calmira, showing how Calmira is structured and highlight the custom components and library files. This should give you a little insight of Calmira's inner structure, should you want to make your own version.

Calmira is a BIG project to say the least. It's complexity can be confusing. Exploring the code, you may think chuncks of code are in the wrong unit, but you will discover that each line of code has it's place, and that many units are an extention of other units.

NOTE: All the units and components are designed ONLY for Delphi 1.

 Calmira Translation Pack

The Calmira Translation Pack has been retired.

It proved to be too diffucult to manage. There were many issues where the translated compiled version would crash, or have other errors due to unmatched strings between some units. Therefor I decided to remove the translation pack.

My apologies to those who put their time into translating Calmira. Sometime, I may think of another way to enable translations. For now, if you want to translate Calmira, You will need Delphi 1.0 to do so.

 Calmira Installer

To build your own automated installer, download our customeized version of Inno Setup, and use this script as a basis for your Setup program. To translate the Setup program, you need to translate default.isl that is included in Inno Setup, or fetch a pre-translated language file from here. Download the 1.2.0 version of the desired language file. You need to make two minor modifications to the downloaded file. These modifications are clearly outlined in the original default.isl.

 Calmira Program Units

The Calmira project is composed of the following units:
  About in 'ABOUT.PAS'       {About Dialog},
  Fileprop in 'FILEPROP.PAS' {File Properties},
  Diskprop in 'DISKPROP.PAS' {Disk Properties},
  Progress in 'PROGRESS.PAS' {Progress Dialog},
  Replace in 'REPLACE.PAS'   {Replace Dialog},
  Splash in 'SPLASH.PAS'     {Splash Form},
  Openfile in 'OPENFILE.PAS' {Open File},
  Runprog in 'RUNPROG.PAS'   {Run Dialog},
  Desk in 'DESK.PAS'         {Desktop},
  Compsys in 'COMPSYS.PAS'   {Computer Window},
  Shorts in 'SHORTS.PAS'     {Shortcuts},
  Filter in 'FILTER.PAS'     {Filter},
  Wastebin in 'WASTEBIN.PAS' {Bin Window},
  Filefind in 'FILEFIND.PAS' {Find Form},
  Iconic in 'ICONIC.PAS'     {Iconic Classes},
  FileMan in 'FILEMAN.PAS'   {File Management},
  Resource in 'RESOURCE.PAS' {Resources},
  Directry in 'DIRECTRY.PAS' {Directories},
  Settings in 'SETTINGS.PAS' {Settings},
  Iconwin in 'ICONWIN.PAS'   {Icon Window},
  Start in 'START.PAS'       {Start Menu},
  Progconv in 'PROGCONV.PAS' {Convert Dialog},
  Referenc in 'REFERENC.PAS' {References},
  Alias in 'ALIAS.PAS'       {Aliases},
  Tree in 'TREE.PAS'         {Explorer Tree},
  Shutdown in 'SHUTDOWN.PAS' {Shutdown dialog},
  Calform in 'CALFORM.PAS'   {Modeless windows},
  Fourdos in 'FOURDOS.PAS'   {4DOS Descriptions},
  Refedit in 'REFEDIT.PAS'   {Reference Editor},
  Menuedit in 'MENUEDIT.PAS' {Menu Editor},
  Strtprop in 'STRTPROP.PAS' {Start Properties},
  Deskprop in 'DESKPROP.PAS' {Desktop Properties},
  Binprop in 'BINPROP.PAS'   {Bin Properties},
  Taskprop in 'TASKPROP.PAS' {Taskbar Properties},
  Sysprop in 'SYSPROP.PAS'   {System Properties},
  Fsysprop in 'FSYSPROP.PAS' {File System Properties},
  Askdrop in 'ASKDROP.PAS'   {Drop Dialog},
  Select in 'SELECT.PAS'     {Select File Dialog},
  Tips in 'TIPS.PAS'         {Tips of the Day},
  Locale in 'LOCALE.PAS'     {Localized strings},
  Task in 'TASK.PAS'         {Taskbar},
  Incsrch in 'INCSRCH.PAS'   {Incremental Search},
  Hooks in 'HOOKS.PAS'       {Windows Hooks (wndhooks.dll)},
  CalMsgs in 'CALMSGS.PAS'   {Calmira Messages},
  Dynamenu in 'DYNAMENU.PAS' {Dynamic Menu's},
  Taskman in 'TASKMAN.PAS'   {Task Manager},
  Password in 'PASSWORD.PAS' {Password Dialog},
  Logon in 'LOGON.PAS'       {Logon Dialog},
  Gotofld in 'GOTOFLD.PAS'   {Goto Dialog};

Next to the main project, there are three other (single file) projects:

Implements low level windows hooks.

Sends a message to Calmira to open the Explorer.

Sends a message to Calmira to open the Task Manager.

 Calmira VCL Components

These custom components are used by Calmira, but can by used by any project. They are placed in the public domain, so use them freely in your own projects!

TAppHolder is a simple container component that provides design-time access to TApplication's properties and events. When the component is loaded, it assigns its data to TApplication.
TSystemMenu provides a thin wrapper for the Windows API menu functions, and is used to change a form's system menu. It's most useful in the OnCreate handler, when you can modify the menu before the form appears. Mainly, it saves you having to remember (or look up) the multitude of parameters.
TLabelSelect is an edit box descendant that places itself over TLabel controls so that users can select the label text and copy it. Only one TLabelSelect is required per form, which uses fewer window handles if you have many labels.
An enhanced TComboBox with added properties and methods, mostly dealing with storing drive and path information. (Owner drawn in Calmira.)
An enhanced TOutline control with added properties and methods. (Owner drawn in Calmira.)
An enhanced TCustomGrid control with added properties and methods. (Owner drawn in Calmira.)
TCheckList is a listbox that acts as an array of checkboxes. It draws each item like a 3D check box, using the Selected property to determine if an item is checked.
This is a TDdeClientConv wrapper component, designed to talk to your browser in order to open URL's and capture it's current location.
If you ever need to drop files into other programs, this component can lend a hand, although it still requires some programming on your part. In a control's OnMouseMove handler, call CanDrop to determine if if the cursor is over a suitable window. In the OnEndDrag handler, call the DragFinished method. If a drop is allowed, the OnFileDrop event is triggered which lets you assign the files to drop.
Allows Delphi programs to accept file drops from File Manager. Another ubiquitous component, but I couldn't find a freeware one with source code so I wrote my own. Since I already had a handler for Application.OnMessage (TAppHolder), I decided against low level subclassing. Consequently, you'll need to call TDropClient.CheckMessage inside the OnMessage handler.
A TBitBtn descendant with one added feature: To enable/disable the displaying of glyphs in all TPicBtns in your project at runtime.
TStyleSpeed is a TSpeedButton descendant which overrides Paint to draw a new border style over TSpeedButton's border. TStyleSpeed provides a new Style property to change between the old TSpeedButton, a Windows 95-like button and a flat IE4-like button.
TBarGauge is a simplified version of Borland's sample TGauge, but is around 10 times faster at drawing, because it doesn't bother to draw the clever "inverse" text effect. Use it for speed critical stuff.
Same as TBarGauge, but in Windows 95 style.
Windows 95 style Tab Control. Use this component in conjuction with a TNoteBook to create a 'property sheet' style page control. Place the notebook ON the tabpanel and set Align to alClient. Adding pages to the notebook, will automatically add the new pages to the tabpanel.
Slider / TrackBar component for Delphi 1.
This component draws a windows 95 style pie chart as seen in Windows 95's Disk Properties dialog.
The 'missing' dialog. Execute will display a modal dialog showing all icons in a given file, and allows the user to browse other files. Returns filename and icon index.

This is a set of Delphi components to access (at least some of) the networking dialogs that are build into Windows for Workgroups. These components provide access to both network drives and printers.


 Calmira VCL System Library

These units contain all sorts of usefull code. Like the components, they are placed in the public domain.

Disk drive functions.

Medium level file utilities.

Defines TExtForm, which is a TForm with facilities for saving its size and position.

This unit initializes by filling the Environment string list with the current DOS environment.

TObjectList is a simple descendant of TList that assumes each item is a descendant of TObject.

TProfile is a simple extension of TIniFile that can read and write string lists, and properties of fonts and headers. It also contains 'missing' methods ported from D2 IniFiles.

TRegistry is a simple wrapper object around ShellAPI's Registry calls, to make the registration database easier to access, much like TIniFile or TRegistry in Delphi 2.

Combines Delphi's new stream system with some of Turbo Vision's useful stream facilities. TStreamer avoids the need to use a TFiler object, and stores data directly to a binary file.

TVersion extracts version information using the functions in VER.DLL.

Some useful Delphi and Windows routines.

Miscellanious string functions.


Calmira: Home | News | Features | Screenshots | Licence | Downloads | Feedback | Suggestions | Guestbook | Members
Support: FAQ | Tips | Support | Mailing Lists | Links Developer: About Us | Source Code | Buglist | Wishlist