BBAnalogEx  v1.4
description
BBAnalogEx is a analog clock plugin for Blackbox for Windows.

BBAnalogEx  requires BBLean (works on 1.12) or Blackbox for Windows 0.0.81 or later (note: some menu parts do not work in Blackbox). BBAnalogEx 1.4 doesnt work on xoblite. Please use BBAnalogEx 1.3 XL. To load in the slit BBSlit must be loaded. Also, you will need to have the newest gdiplus.dll run-time from MS. Most likely you already have it, but you can find it here for all windows OS's. Sound files found here.

revision history

BBAnalogEx 1.4 (2004-06-23) / Theo

  • Select the parts of the clock you want to show
  • Select tollbar, button, buttopr style setting
  • Custom style, custom hand, custom font setting
  • Select if you want to have the colors follow the style or not
  • Load a bitmap in the background (doesnt work on win9x)
  • Change the bitmap using a broam
  • Select if you want to anti-alias the graphics (the numbers, tics and hands)
  • Set the lenght of seconds, minutes and hours hand
  • Select if you want the 24hour or the 12hour format with the digital clock.
  • Now you can select the font which is used for the numbers (little bugy but i work on it)
  • BBAnalogEx 1.3 (2004-06-08) / Theo

  • Third release by Theo
  • Draw or not to draw border...(that is the question :-))
  • Lock position.
  • Can now change into a digital clock.
  • Setting relevant to the digital clock added.
  • All bro@ms have been changed from BBAnalog to BBAnalogEx.
  • All setting in .rc file have been changed from BBAnalog to BBAnalogEx.
  • BBAnalogEx 1.2 RC1(2004-05-26) / Theo

  • Second release by Theo
  • Full Transparent Background setting added
  • Every setting can now be changed from menu
  • BBAnalogEx 1.0 (2004-05-20) / Theo

  • First release by Theo
  • Oval and Hole form added
  • Can show Normal numbers instead of Roman Numbers
  • Number font size and font color can now be determined in rc file
  • Hands color and thickness can now be determined in rc file
  • BBAnalog 1.7 (2003-06-12) / Mortar

  • Fourth release.
  • Fixed a bad bug that would case the timer to get messed up if someone tried to add BBAnalogEx to the slit through the right-click menu will the alarm was cycling.
  • BBAnalog 1.6 (2003-05-18) / Mortar

  • Third release.
  • Added slit support. Do not need latest nightly of BB4Win. But do need the latest nightly of BBSlit.
  • Added one more config setting. BBAnalogEx.inSlit:
  • Fixed memory leaks that causes crash on 9x/ME. Hopefully. ;)
  • No more firstPass BS, now you can refresh BB4Win more than once in a second without crashing the gdiplus.dll.
  • BBAnalog 1.5 (2003-05-12) / Mortar

  • Second release.
  • Upgraded to GDI+ graphics lib.
  • Added a ton of new settings, too many to list here.
  • BBAnalog 1.0 (2003-04-04) / Mortar

  • Original release.
  • future releases?
  •  
  • known issues
  • No known issues, but if anyone finds a bug, or discovers an issue, please let me know. I don't have a windows 9x or ME machine to test anything, so if any user using one of those systems has a problem, let me know, and I will try to work with you.
  • license information
    © 2003 Brad Bartolucci [Mortar]
    © 2004 Miroslav Petrasko [Theo]

    BBAnalogEx IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE AUTHOR DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF THE AUTHOR OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    initial setup

    To load BBAnalogEx you simply need to add the relative path of the plugin (from your Blackbox directory) to the Blackbox configuration file plugins.rc (located in the Blackbox directory). For example, if you installed Blackbox into c:\Blackbox, and BBAnalogEx.dll is located in c:\Blackbox\plugins\BBAnalogEx\, you should add the line...

    plugins\BBAnalogEx\BBAnalogEx.dll
    for when you are not loading the BBSlit plugin. Or...
    &plugins\BBAnalogEx\BBAnalogEx.dll
    for when loading it with or in the BBSlit plugin.

    ...to plugins.rc. Simple, eh? :) Make sure to note the '&' at the beginning of the second load line.

    You should also have a look at the BBAnalogEx.rc file after you load the plugin, in case there are any settings you would want to customise. The file will be saved if there is no file found.  You can access this file by right clicking on the plugin and choosing the "Settings" submenu, then choose "Edit Settings".  These settings are shown below.

    how to use BBAnalogEx...

    Mouse Input

    Once the plugin is loaded, a few things can be done with a simple click on the BBAnalogEx window.

    Left Click  none
    Left Click + Ctrl    Shows the current date for 3 seconds, then displays the clock again. (does not work in the digital clock) 
    Double Left Click   Displays the Date/Time control panel item 
    Middle Click  Shows the current date for 3 seconds, then displays the clock again.
    Right Click  Opens configuration menu 
    Right Click + Ctrl   none

    The Menu

    The plugin menu let's you change or select various things, and most should be self-explanatory. However, there is one submenu worth mentioning - the "Settings" submenu.

    This submenu let's you "Save Settings" (current) to file, or "Reload Settings" that you have edited. These are important because a) BBAnalogEx only writes settings when you tell it to, or on plugin shutdown, and b) you do not need to reconfigure bb4win in order to have BBAnalogEx reload settings from the BBAnalogEx.rc file.  One more thing to note.  If you change any of the settings, or move the window, you may want to choose "Save Settings", otherwise when you choose "Reload Settings" BBAnalogEx will go back to the last saved configuration. When you change files manually from the .rc file and save them, always choose "Reload Settings" so that BBAnalogEx will get the new settings.

    Keyboard Input

    None.

    Miscellaneous Notes (BBAnalog 1.7)  

    You can now load BBAnalogEx in the BBSlit plugin, but you must use the '&' at the beginning of your plugins.rc setting for loading BBAnalogEx.dll. Do not use the '&' symbol if you are not loading bbslit.dll in the plugins.rc file. When loaded with bbslit.dll and the '&' sybmbol for BBAnalogEx, you have the option of setting it in and out of the slit at any time. Otherwise the BBAnalogEx.inSlit: config setting has no effect when BBAnalogEx is not loaded with an '&' symbol.

    Everything centers perfect now. Alarm time can only be set in the rc file. Make sure you reload the settings using the BBAnalogEx right click menu. If BBAnalogEx.synchronize: false, then the .wav file will only be played once, otherwise it will be played each time the animation recycles. Each frequency setting effects the animation recycle count only for each respective alarm, not how many times the .wav file is played for each alarm. However, the .wav file will be played as many times as each of the respective frequency settings if synchronize is true.

    NOTE: When switching from showing the seconds hand to not shownig the seconds hand, the redraw timer for BBAnalogEx is set to one minute, so the minute hand will not update until exactly one minute after you change the showSeconds setting to false and then reload BBAnalogEx.

    TIP: If the .wav sound gets clipped(not played completely) everytime it plays in synchronization with the animation, try lowering the animationFPS. This will animate the alarm at a slower pace, giving more time for the .wav file to complete it's sound.

    Also, if you wish for only play part of a .wav file to play each time it is repeated, and then complete the .wav on the last alarm sound. Try increasing the animationFPS and test to it to fine tune it to your liking.

    All currently set alarms can be found in the BBAnalogEx right click menu, and can be selected to test that alarm. If there are no alarms, then it will display "no set alarms" as the menu title name.

    BBAnalogEx.rc settings

    If a configuration file for some reason (e.g. you deleted it <g>) can not be found at startup (BBAnalogEx will first search for it in the same directory as the plugin, then in the Blackbox directory), BBAnalogEx will automatically create one for you in the same directory as the plugin.  Most settings are configurable from the menu.  All number values and .wav file settings must be done manually in the .rc file.

    BBAnalogEx.x: 0 X position of the analog clock.
    BBAnalogEx.y: 895 Y position of the analog clock.
    BBAnalogEx.size: 40 Width and Height of the analog clock window. Too small may look distorted. No less than 5, max 300.
    BBAnalogEx.alpha: 160 Sets the tranparency level. 0-255, 0 being completely transparent.
    BBAnalogEx.region: 2 Region selection for the clok, 0 - standar rectangle, 1 - oval shape, 2 - oval with a hole in the middle
    BBAnalogEx.snapwindow: true Tells BBAnalogEx to snap to the edges of the screen.
    BBAnalogEx.transparency: false Tells BBAnalogEx to use the alpha value for tranparency opacity.
    BBAnalogEx.fullTrans: false Tells BBAnalogEx to use fully transparet background.
    BBAnalogEx.lockPosition: false Set this true and the clock cannot be moved with the mouse...
    BBAnalogEx.pluginToggle: true Tells BBAnalogEx to hide with other plugins.
    BBAnalogEx.inSlit: true Tells BBAnalogEx to reload/load in/out of the slit. Only works if the BBSlit plugin is loaded in the plugins.rc file.
    BBAnalogEx.alwaysontop: true Tells BBAnalogEx to be ontop of all windows.
    BBAnalogEx.digitalClock: true Tells BBAnalogEx to change into a digital clock.
    BBAnalogEx.digiFillOn: true Do you want the parts of the digital clock to be filled or just lines.
    BBAnalogEx.24hourformat: true Use the 24hour format for the digital clock or not.
    BBAnalogEx.antiAlias: true Do you want to use anti-aliashing or not.
    BBAnalogEx.customStyle: trueWhen set to true the clock doest follows the style instead it uses its ownd setting of color and colorto
    BBAnalogEx.customHands: trueWhen set to true the clock uses user color settings, when false it uses the style font color
    BBAnalogEx.customFont: trueWhen set to true the clock uses user color and font settings
    BBAnalogEx.windowStyle: label Tells BBAnalogEx which, (one of label, labelWindow, button, buttonpr, tollbar or clock), style definition to use for inner gradient.
    BBAnalogEx.customColor: #000000 If you selected the custom style this is one of the two colors that are used.
    BBAnalogEx.customColorTo:#000000 If you selected the custom style this is one of the two colors that are used.
    BBAnalogEx.showSeconds: true Tells BBAnalogEx to show/hide seconds hand.
    BBAnalogEx.showMinutes: true Tells BBAnalogEx to show/hide minutes hand.
    BBAnalogEx.showHours: true Tells BBAnalogEx to show/hide hours hand.
    BBAnalogEx.showSmallTics: true Tells BBAnalogEx to show/hide small tics.
    BBAnalogEx.showLargeTics: true Tells BBAnalogEx to show/hide large tics.
    BBAnalogEx.romanNumerals: true Tells BBAnalogEx to draw Roman Numerals or draw only tics.
    BBAnalogEx.normalNumerals: false Tells BBAnalogEx to draw Normal Numerals or draw only tics. You can only draw roman or normal numerals at one time.
    BBAnalogEx.showCircle: false Tells BBAnalogEx to draw outer edge circle or not.
    BBAnalogEx.drawBorder: false Tells BBAnalogEx to draw the border or not.
    BBAnalogEx.digiLineColor: #000000 Outline color of the digital clock parts
    BBAnalogEx.digiFillColor: #ffffff Fill color of the digital clock parts. Note that if the digiFillOn is set to false, the fill isnt drawn.
    BBAnalogEx.digiHeight: 2 Height of the parts of the digital clock, the lengts is counted from the size. Note that setting this to a higher value may result in something that dont look like a clock (try and you`ll see). The best results are betweek 2 and 5
    BBAnalogEx.numberColor: #FFFFFF Color used to draw text, numbers and ticks.
    BBAnalogEx.secondHandColor: #FFFFFF Color used to draw seconds hand.
    BBAnalogEx.minutedHandColor: #FFFFFF Color used to draw minutes hand.
    BBAnalogEx.hourHandColor: #FFFFFF Color used to draw hours hand.
    BBAnalogEx.fontSizeC: 11 Font size used to draw numbers on the clock
    BBAnalogEx.secondHandWidth: 2 Width of the seconds hand in pixels
    BBAnalogEx.minuteHandWidth: 2 Width of the minutes hand in pixels
    BBAnalogEx.hourHandWidth: 2 Width of the hours hand in pixels
    BBAnalogEx.secondHandLength: 2 Length of the seconds hand in % of clock radius.
    BBAnalogEx.minuteHandLength: 2 Length of the minutes hand in % of clock radius.
    BBAnalogEx.hourHandLength: 2 Length of the hours hand in % of clock radius.
    BBAnalogEx.timeAlarm: 9:00pm Tells BBAnalogEx when a set time alarm should go off. Must have am/pm after a 12 hour type time. If the input string is the wrong format, it will be reset to a blank string. Spaces between hour:minute and am/pm are welcome, and so are caps for AM/PM. Remember to reload your settings using BBAnalogEx right click menu after changing the alarm value.
    BBAnalogEx.hourAlarm: true Tells BBAnalogEx to use/~use hourly alarm.
    BBAnalogEx.halfHourAlarm: true Tells BBAnalogEx to use/~use half hour alarm. Only on 30 minutes after the hour.
    BBAnalogEx.timeAlarmFreq: 10 Tells BBAnalogEx how many times the set alarm will draw. No less than 1, max 30.
    BBAnalogEx.hourAlarmFreq: 10 Tells BBAnalogEx how many times the hourly alarm will draw. No less than 1, max 30.
    BBAnalogEx.halfHourAlarmFreq: 10 Tells BBAnalogEx how many times the half hour alarm will draw. No less than 1, max 30.
    BBAnalogEx.animationFPS: 15 Draw speed in frames per second. Good for fine tuning at different sizes. No less than 1, max 30.
    BBAnalogEx.synchronize: true Tells BBAnalogEx to play the .wav file every time the animation loops, else the .wav is played only once.
    BBAnalogEx.timeAlarmWav: radarping.wav Tells BBAnalogEx which .wav file to play. Can be an absolute path, or if it is in the same directory as BBAnalogEx, use this setting without the path string, just file name. If not going to use as sound, use .none to indicate you are not using a file.
    BBAnalogEx.hourAlarmWav: sonar2.wav Same as above setting. If not going to use as sound, use .none to indicate you are not using a file.
    BBAnalogEx.halfHourAlarmWav: sonar3.wav Same as above setting. If not going to use as sound, use .none to indicate you are not using a file.
    BBAnalogEx.bitmapFile: .noneUse .none to indicate you are not using a bitmaf file, if you do specifi the path to the bitmap file.
    BBAnalogEx.font: anorexia Font to be used when the custom font is selected

    Please note that BBAnalogEx automatically saves the current running configuration when you quit or restart Blackbox, overwriting the previous contents of the file. If you want to change these values and make BBAnalogEx read them again, edit the file, then save the file, and then select "Reload Settings" from the plugin's "Settings" submenu.

    BBAnalogEx bro@ms

    @BBAnalogExSetBitmap  Bro@m to set the background bitmap of BBAnalogEx (for example: @BBAnalogeExSetBitmap c:/clock.bmp)
    @BBShowPlugins  Standard BB bro@m to show all plugins
    @BBHidePlugins  Standard BB bro@m to hide all plugins 

    @BBAnalogExAbout  Shows the about window 

    @BBAnalogExPluginToggle  Toggles whether BBAnalogEx hides with other plugins 
    @BBAnalogExOnTop  Toggles whether or not BBAnalogEx is always ontop 
    @BBAnalogExEditRC  Opens the BBAnalogEx's RC file for configuration 
    @BBAnalogExReloadSettings  Tells BBAnalogEx to reload settings from the RC file
    @BBAnalogExSaveSettings  BBAnalogEx will save currently loaded settings. 

    acknowledgements
     Thanks to Nigthbreed and Arc Angel who tested this plugin, and all the other people making feature suggestion in the forum :)