BBAnalog  v1.7
description
BBAnalog is a analog clock plugin for Blackbox for Windows.

BBAnalog v1.7 requires Blackbox for Windows 0.0.81 or later. 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

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 BBAnalog 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. BBAnalog.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?
  • I need to clean up the style reading code so that it is more intelligible and to make it handle some weird cases. 
  • 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]

    BBANALOG 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 BBAnalog 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 BBAnalog.dll is located in c:\Blackbox\plugins\BBAnalog\, you should add the line...

    plugins\BBAnalog\BBAnalog.dll
    for when you are not loading the BBSlit plugin. Or...
    &plugins\BBAnalog\BBAnalog.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 bbanalog.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 BBAnalog...

    Mouse Input

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

    Left Click  none
    Left Click + Ctrl    Shows the current date for 3 seconds, then displays the clock again. 
    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) BBAnalog 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 BBAnalog reload settings from the bbanalog.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" BBAnalog 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 bbanalog will get the new settings.

    Keyboard Input

    None.

    Miscellaneous Notes  

    You can now load BBAnalog in the BBSlit plugin, but you must use the '&' at the beginning of your plugins.rc setting for loading bbanalog.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 BBAnalog, you have the option of setting it in and out of the slit at any time. Otherwise the BBAnalog.inSlit: config setting has no effect when BBAnalog 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 bbanalog right click menu. If bbanalog.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 BBAnalog 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 BBAnalog.

    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 BBAnalog 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.

    bbanalog.rc settings

    If a configuration file for some reason (e.g. you deleted it <g>) can not be found at startup (BBAnalog will first search for it in the same directory as the plugin, then in the Blackbox directory), BBAnalog 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.

    bbanalog.x: 0 X position of the analog clock.
    bbanalog.y: 895 Y position of the analog clock.
    bbanalog.size: 40 Width and Height of the analog clock window. Too small may look distorted. No less than 5, max 300.
    bbanalog.inSlit: true Tells BBAnalog to reload/load in/out of the slit. Only works if the BBSlit plugin is loaded in the plugins.rc file.
    bbanalog.alwaysontop: true Tells BBAnalog to be ontop of all windows.
    bbanalog.transparency: false Tells BBAnalog to use the alpha value for tranparency opacity.
    bbanalog.alpha: 160 Sets the tranparency level. 0-255, 0 being completely transparent.
    bbanalog.snapwindow: true Tells BBAnalog to snap to the edges of the screen.
    bbanalog.pluginToggle: true Tells BBAnalog to hide with other plugins.
    bbanalog.showSeconds: true Tells BBAnalog to show/hide seconds hand.
    bbanalog.useRedSeconds: true Tells BBAnalog to use color Red or fontColor for seconds hand.
    bbanalog.useYellowMins: false Tells BBAnalog to use color Yellow or fontColor for minutes hand.
    bbanalog.useBlueHours: false Tells BBAnalog to use color Blue or fontColor for hours hand.
    bbanalog.romanNumerals: true Tells BBAnalog to draw Roman Numerals or draw only tics.
    bbanalog.showCircle: false Tells BBAnalog to draw outer edge circle or not.
    bbanalog.windowStyle: label Tells BBAnalog which, (one of label, labelWindow, or clock), style definition to use for inner gradient.
    bbanalog.timeAlarm: 9:00pm Tells BBAnalog 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 BBAnalog right click menu after changing the alarm value.
    bbanalog.hourAlarm: true Tells BBAnalog to use/~use hourly alarm.
    bbanalog.halfHourAlarm: true Tells BBAnalog to use/~use half hour alarm. Only on 30 minutes after the hour.
    bbanalog.timeAlarmFreq: 10 Tells BBAnalog how many times the set alarm will draw. No less than 1, max 30.
    bbanalog.hourAlarmFreq: 10 Tells BBAnalog how many times the hourly alarm will draw. No less than 1, max 30.
    bbanalog.halfHourAlarmFreq: 10 Tells BBAnalog how many times the half hour alarm will draw. No less than 1, max 30.
    bbanalog.animationFPS: 15 Draw speed in frames per second. Good for fine tuning at different sizes. No less than 1, max 30.
    bbanalog.synchronize: true Tells BBAnalog to play the .wav file every time the animation loops, else the .wav is played only once.
    bbanalog.timeAlarmWav: radarping.wav Tells BBAnalog which .wav file to play. Can be an absolute path, or if it is in the same directory as BBAnalog, 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.
    bbanalog.hourAlarmWav: sonar2.wav Same as above setting. If not going to use as sound, use .none to indicate you are not using a file.
    bbanalog.halfHourAlarmWav: sonar3.wav Same as above setting. If not going to use as sound, use .none to indicate you are not using a file.

    Please note that BBAnalog 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 BBAnalog read them again, edit the file, then save the file, and then select "Reload Settings" from the plugin's "Settings" submenu.

    bbanalog bro@ms

    @BBShowPlugins  Standard BB bro@m to show all plugins
    @BBHidePlugins  Standard BB bro@m to hide all plugins 

    @BBAnalogAbout  Shows the about window 

    @BBAnalogPluginToggle  Toggles whether BBAnalog hides with other plugins 
    @BBAnalogOnTop  Toggles whether or not BBAnalog is always ontop 
    @BBAnalogEditRC  Opens the BBAnalog's RC file for configuration 
    @BBAnalogReloadSettings  Tells BBAnalog to reload settings from the RC file
    @BBAnalogSaveSettings  BBAnalog will save currently loaded settings. 

    acknowledgements
    Special thanks to all in the #bb4win channel that contributed.  If it was not for your love this plugin would never had gotten started.  :)