============================================================================ BarMenu Components Copyright (C) 2000-2001 Bluecave Software. All Rights Reserved. ============================================================================ License: ======== For license terms see License.txt. You may not use this package in anyway unless you agree the terms. So, before you continue, please read the License. Contact information: ==================== Latest version of the BarMenus is available at: http://Mintus.Codefield.com/download/BarMenus.zip Bluecave Software, http://www.bluecave.net/ support@bluecave.net Jouni Airaksinen, http://Mintus.Codefield.com/ Mintus@Codefield.com If you have any questions or suggestions contact me. Use either my personal email or the Bluecave Software support email. Any emails related to this package are welcome. If you want to praise these components, you are welcome to do so. Actually, I would appreciate your comments very much. Without any mental support, I seen no point developing these for others than just me and my needs. What are BarMenu Components? ============================ BarMenu Components is a package to create menus and popupmenus with a gradient bar - like the start-menu. Gradient bar is drawn dynamically so you get very smooth bar with customizable colors. Alternatively you can have bitmap as a bar or even both; bitmap *and* gradient bar. Gradient bar can have dynamically created vertical caption. You can have additional bitmap (e.g. logo) on the bar and it can be positioned with 1 pixel accuracy. Menu separator lines can be drawn in a short way - like in Office 2000. Menu separator line can have text in it - like in ICQ. For more flexibility you can always use the events and draw the menu bar completely yourself! Components are compatible with VCL, so it is easy to convert existing menus. In addition BarMenus are resource friendly. BarMenu Components package contain following components: - TBcBarMainMenu - TBcBarPopupMenu Requirements: ============= Delphi 5 or later is required by BarMenu Components. Might be coming: version for C++Builder (version number probaby 4 or 5 and later) version for Kylix Installing: =========== After unzipping the file in the package to own directory you should have following directories: Demo\ - demo program demonstrating the component Packages\ - packages for different compilers Source\ - source files 1. Add the Source\ directory to your library path. * Tools | Enviroment Options | Library | Library path ... * write the path to the edit box and press Add. 2. Open appropiate package file in your IDE by selecting File | Open. 3 In the resulting package window, click the Install button. If this package has already been installed (i.e. you are updating existing files), click the Compile button instead. Now you should have the components under Bluecave tab in the component palette. Uninstalling ============ If you need to uninstall the components: 1. Open Packages window by selecting Component | Install Packages. 2. Find the "Bluecave: BarMenu Components" package from the window and uncheck the box next to it. 3. Click Remove and then Yes. 4. In addition you may remove the Source\ directory from the library path. TBcBarPopupMenu and TBcBarMainMenu ================================== TBcBarPopupMenu works like the normal TPopupMenu but TBcBarPopupMenu introduces few new properties. TBcBarMainMenu is similar to normal TMainMenu and it introduces few new properties as well. Following properties are common for both components: + property ShortLines: Boolean | If this is True, the separator lines are shorter like in Microsoft | Office 2000. | + property Bar: TBcBar | These properties alter the look of the menu bar. In TBcBarMainMain the | bar is shown in the first visible top level menu. | +-- property BarBitmap: TBcBarBitmap | | This property controls the bitmap on the bar: | | | +-- property Bitmap: TBitmap | | Bitmap which is drawn on the bar. | | | +-- property VertAlignment: TVertAlignment | +-- property HorzAlignment: THorzAlignment | | Alignment values to position bitmap, fine tune position with Offsets | | | +-- property OffsetX: Integer | +-- property OffsetY: Integer | | Fine tune the bitmap position | | | +-- property Transparent: Boolean | If this is True, then the Bitmap is drawn transparently. Transparent | color is the bottom left pixel. | +-- property BarBackBitmap: TBcBarBackBitmap | | This property controls the background bitmap on the bar: | | | +-- property Bitmap: TBitmap | | Background Bitmap which is drawn on the bar. | | | +-- property DrawStyle: TDrawStyle | | Style how the background is drawn to the bar. Possible values: | | dsNormal, dsTile, dsStretch. | | | +-- property VertAlignment: TVertAlignment | +-- property HorzAlignment: THorzAlignment | | Alignment values to position bitmap, fine tune position with Offsets | | If DrawStyle is dsTile then these tell from where start to tile. | | Note: No effect if DrawStyle is dsStretch. | | | +-- property OffsetX: Integer | +-- property OffsetY: Integer | | Fine tune the bitmap position. If DrawStyle is dsTile, these will fine | | tune the tiling start position. | | Note: No effect if DrawStyle is dsStretch. | | | +-- property Transparent: Boolean | If this is True, then the Bitmap is drawn transparently. Transparent | color is the bottom left pixel. If the bitmap is transparent or doesn't | fill the whole bar the Bitmap is drawn on top gradient bar. | +-- property BarCaption: TBcBarCaption | | This property controls the vertical caption on the bar: | | | +-- property Caption: string | | Caption which is drawn to the bar | | | +-- property Font: TFont | | Font which is used to draw the caption | | | +-- property OffsetY: Integer | | Offset from the bottom of the bar. Caption is always centered to the | | bar. If Bitmap is aligned to the bottom, then offset is from the bitmap | | top. Defaults to -6 (which is most of the time just okay). | | | +-- property Alignment: TVertAlignment | | To where the text is aligned in the bar. Defaults to vaBottom. | | | +-- property Direction: TDirection | Direction from which the text is drawn. Defaults to dDownToUp. | +-- property GradientStart: TColor +-- property GradientEnd: TColor | These control the color of the gradient bar. To disable gradient bar drawing | e.g. for transparent bar background bitmaps set both colors to same color | (clBtnFace for system popupmenu color). | +-- property Visible: Boolean | If this is False, the popupmenu looks like normal popupmenu. Note, you can | still use the ShortLines and the separator line captions! | +-- property Width: Integer Width of gradient bar Following events are common for both components: + property OnBeforeDrawBar: TOnBeforeDrawBarEvent | This event is executed just before the bar needs to be refreshed. | You can make any custom initialization and/or draw the whole bar yourself | to the given canvas. Set DefaultDraw to False, if you don't want to | the default bar drawing to take place. Note, if DefaultDraw is set False | no drawing to bar is done. So it is completely up to you want the bar | contains. DefaultDraw defaults to True. | Warning: You should only use the given canvas locally. | + property OnAfterDrawBar: TOnAfterDrawBarEvent This event is executed after the internal bar drawing has been done. This way you can implement some custom content over the bar. Problems in using the BarMenu Components? ========================================= Please read the FAQ.txt and follow the instructions. Known problems and limitations ============================== * TBcBarMainMenu Does not work with Borland's TMenuBar component. * You cannot make submenus to have menu bars. * If bar Side is set to sRight the submenu arrows are drawn over the bar. Workaround -> make the bar look ok even if the arrows are at "wrong" place. Use e.g. tiled, aligned and transparent single color background bar to "reserve" the arrow space. ============================================================================