Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

tchrometabs-bgrabitmap

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

TChromeTabs BGRABitmap port


This is a port of TChromeTabs v2.7 component thats rendering with BGRABitmap library. This version is targered for Lazarus IDE/LCL Windows. The origin control is a fully implementation of Chrome/Chromium tabs, visual and behaviour control with add/close bottons and drag as well. This port keeps the original code and add support for render all stuff with BGRABitmap library, using macros without loose the original render code. This modifications are not made for delphi compatible, but may works.

Current state


This version is able to compile with both renderer libraries, under the GDIPlus(original) and BGRABitmap with almost identical results. A quite difference is the font render by BGRABitmap, that seems to draw smaller/tinner font. Also Some elements like Add button. In terms of Antialias curves and draw quality both are great.

The original control is alpha release for LCL, but is very good. I could not perceive any problem for basic usage. There is no problem related to this port implementation.

Port motivation


I would like to use this control in cross plataform way for my projects. This is not possible at the current state of the control because is fully dependent of Windows API, specially GDIPlus graphic Lib. This port is a bridge version for my goal cross version, that must strip all Windows related code and make a deep modification for my needs. The implementation with BGRABitmap enables and validate the base code for my next steps.

I share this version for any person who want to mantain this version or only usage in current state.

This port version will not have any subsequent versions maintained by this author. I hope someone have the interesting to keep a new fork of this great piece of software.

Features


  • The original control was written for Windows, with Windows API and supposedly may support transparency. Maybe it works for VCL but i cannot use with Lazarus LCL. You can see only the black background(See the tab control on bottom created by demo application).
  • There is a glow effect on mouse pointer over the tabs. This effect works for GDIPlus but not for BGRABitmap. Its not ported because i cannot clip the area(Polygon) with BGRABitmap. I can clip a TRect, but not a polygon as required by the effect. Maybe someone make the magic later.
  • As i have tested, all other features works like a charm.
  • There is a bug/raise exception for tab drag in vertical way, maybe is only for Lazarus/LCL.
  • There is no benefit or any bug fix at this port version.

Required


  1. Must use the Lazarus 4.2/FPC-3.2.2 or newer.
  2. Must install the bgrabitmap-11.6.6 first.
  3. The original version requires a GDIPlus library, installed by the service pack if your Windows is up to date.
  4. The GDIPlus api binding is already included by the component.

Usage


No install package for Lazarus IDE. Just open the demo application on folder \Demo-Lazarus. The componente must be created at run-time in case of new projects. For your project, just copy the \Lib and \GDIPlus folders to the top folder of the Project, rename the folders if you want and add the paths on Project Options (Shift+Ctrl+F11) Lazarus IDE dialog.

Switch the renderer


  • The default demo renderer is the bgrabitmap.
  • The switch to the original(GDIPlus) is doing removing the demo Project define: SET_BGRABITMAP. (Lazarus Menu)Project → Project Options (Shift+Ctrl+F11) → Compiler Options → Custom Options (dSET_BGRABITMAP).
  • For your own project you must set this define(dSET_BGRABITMAP) or will use the GDIPlus as the default renderer.
  • See the port additional file fpc_adds.inc for details.

References


Authors


  • This port is made by Humberto Teófilo.
  • The original version is made by Paul Spencer Thornton, and many other contributors.

License


Same license of the original software. This software is released under Mozilla Public License Version 1.1. See the file licence.txt for fully copyright details.