Difference between revisions of "BGRAControls/ru"

From Free Pascal wiki
Jump to navigationJump to search
Line 84: Line 84:
 
=== TBCTrackBarUpdown ===
 
=== TBCTrackBarUpdown ===
  
A control to input numeric values with works like a trackbar and a spinedit both in one control.
+
Элемент управления для ввода числовых значений, работает как трекбар и spinedit в одном элементе управления.
  
 
=== TBGRAFlashProgressBar ===
 
=== TBGRAFlashProgressBar ===

Revision as of 00:39, 21 December 2018

Deutsch (de) English (en) português (pt) русский (ru) 中文(中国大陆)‎ (zh_CN)

Установка

Используйте Online Package Manager для получения BGRABitmap и BGRAControls.

Обратите внимание, что вы должны проверять только пакеты "bgrabitmappack.lpk" и "bgracontrols.lpk" в онлайн-менеджере пакетов. Другие пакеты являются необязательными и могут потребоваться сторонние пакеты / библиотеки для работы (OpenGL и PascalScript).

Дополнительные компоненты

Начиная с версии 4.4, компоненты TBCDefaultThemeManager, TBCKeyboard и TBCNumericKeyboard не устанавливаются по умолчанию, чтобы позволяет пользователям Linux получить беспроблемную установку с помощью Online Package Manager без установки сторонних компонентов. Если вы хотите, чтобы эти компоненты [установлены], подключите [их] в "Register unit" в опциях пакета для каждого файла (bcdefaulthememanager.pas, bckeyboard.pas, bcnumerickeyboard.pas), затем скомпилируйте и пересоберите Lazarus. В Linux вам нужно сначала установить [пакеты] libxtst-dev и libgl-dev.

Веб-сайт

BGRABitmap Organization on GitHub: https://github.com/bgrabitmap/

Элементы управления BGRA

Элементы управления BGRA - это набор графических элементов пользовательского интерфейса, которые можно использовать с приложениями Lazarus LCL. Под Linux вам нужно установить [пакеты] libxtst-dev и libgl-dev.

TBCButton

bcbutton.png

Элемент управления - кнопка, который можно стилизовать через свойства для каждого состояния, например StateClicked, StateHover, StateNormal, с такими настройками, как градиенты, границы и текст с тенями. Вы можете назначить уже созданный стиль через свойство AssignStyle.

TBCButtonFocus

TBCButtonFocus.png

Аналогичен TBCButton, но поддерживает фокусировку как обычный TButton.

TBCGameGrid

bcgamegrid.png

Сетка с пользовательской шириной и высотой элементов и любым количеством горизонтальных и вертикальных ячеек, которые можно нарисовать с помощью BGRABitmap непосредственно с событием OnRenderControl.

TBCImageButton

  • samplebgraimagebutton.png
  • samplebgraimagebuttonalpha.png

Элемент управления - кнопка, который можно стилизовать с помощью одного файла изображения, содержащего рисунок для каждого состояния Normal(«Обычный»), Hovered(«Наведенный»), Active(«Активный») и Disabled(«Отключенный»). Он поддерживает функцию 9-фрагментного масштабирования. Он поддерживает приятную анимацию затухания, которую можно включить.

TBCXButton

bcxbutton.png

Элемент управления - кнопка, который может быть стилизован [при помощи кода] в событии OnRenderControl. Или даже лучше создать свой собственный дочерний элемент управления, наследующийся от этого класса.

TBCLabel

bclabel.png

Элемент управления - label, у который можно [настраивать] стиль через свойства, он поддерживает тени, настраиваемые границы и фон.

TBCMaterialDesignButton

TBCMaterialDesignButton 01.png TBCMaterialDesignButton 02.png TBCMaterialDesignButton 03.gif

Элемент управления - кнопка - с эффектом анимации в соответствии с рекомендациями Google Material Design. Он поддерживает пользовательский цвет для фона и для зацикленной анимации, также вы можете настраивать тень.

TBCPanel

bcpanel.png

Элемент управления - панель, у который можно [настраивать] стиль через свойства. Вы можете назначить уже созданный стиль через свойство AssignStyle.

TBCRadialProgressBar

TBCRadialProgressBar.png

Индикатор выполнения с радиальным стилем. Вы можете установить цвет и свойства текста, как вам нравится.

TBCToolBar

TToolBar с событием OnRedraw, чтобы нарисовать его, используя BGRABitmap. Он также поддерживает OnPaintButton по умолчанию для настройки рисования кнопок. По умолчанию это стиль панели инструментов проводника, похожий на Windows 7.

TBCTrackBarUpdown

Элемент управления для ввода числовых значений, работает как трекбар и spinedit в одном элементе управления.

TBGRAFlashProgressBar

BC-Bgraflashprogressbar.png

A progress bar with a default style inspired in the old Flash Player Setup for Windows progress dialog. You can change the color property to have different styles and also you can use the event OnRedraw to paint custom styles on it like text or override the entire default drawing.

TBGRAGraphicControl

Is like a paintbox. You can draw with transparency with this control using the OnRedraw event.

TBGRAImageList

before-TImageList.png

after-TBGRAImageList.png

An image list that supports alpha in all supported platforms.

TBGRAImageManipulation

bgraimagemanipulation.jpg

A tool to manipulate pictures, see the demo that shows all the capability that comes with it.

TBGRAKnob

BC-Bgraknob.png

A knob that can be styled through properties.

TBGRAResizeSpeedButton

A speed button that can resize the glyph to fit in the entire control.

TBGRAShape

samplebgrashape.png

A control with configurable shapes like polygon and ellipse that can be filled with gradients and can have custom borders and many other visual settings.

TBGRASpeedButton

BGRASpeedButton.png

A speed button that in GTK and GTK2 provides BGRABitmap powered transparency to the glyph.

TBGRASpriteAnimation

bgraspriteanimation.png

A component that can be used as image viewer or animation viewer, supports the loading of gif files.

TBGRAVirtualScreen

Is like a panel. You can draw this control using the OnRedraw event.

TDTAnalogClock

A clock.

TDTAnalogGaugue

A gauge.

TDTThemedClock

Another clock.

TDTThemedGauge

Another gauge.

TPSImport_BGRAPascalScript

A component to load BGRABitmap pascal script utilities.

BGRA Custom Drawn

BGRA Custom Drawn is a set of controls inherited from Custom Drawn. These come with a default dark style that is like Photoshop.

TBCDButton

A button control that is styled with TBGRADrawer.

TBCDEdit

An edit control that is styled with TBGRADrawer.

TBCDStaticText

A label control that is styled with TBGRADrawer.

TBCDProgressBar

A progress bar control that is styled with TBGRADrawer.

TBCDSpinEdit

A spin edit control that is styled with TBGRADrawer.

TBCDCheckBox

A check box control that is styled with TBGRADrawer.

TBCRadioButton

A radio button that is styled with TBGRADrawer.

Sample code

BGRA Controls comes with nice demos to show how to use the stuff and extra things you can use in your own projects.

Pascal Script Library

Putting BGRABitmap methods into a .dll with c#, java and pascal headers.

BGRA Ribbon Custom

How to create a fully themed window using the controls to achieve a Ribbon like application.

Tests

There are test for analog controls (clock and gauge), BC prefixed controls, BGRA prefixed controls, BGRA Custom Drawn controls, how to use Pascal Script and BGRABitmap, bgrascript or how to create your own scripting solution with BGRABitmap.

Tests Extra

game maze.png

game puzzle.png

customdrawnwindows7.png

slicescaledtachart.png

These are extra tests like how to use fading effect, an fpGUI theme, games like maze and puzzle, how we created the material design animation, pix2svg or how to convert a small picture to svg using hexagons, rectangles and ellipses, plugins or how to load .dlls and use into a TBGRAVirtualScreen, rain effect, shadow effect, 9-slice-scaling with Custom Drawn or how to theme with bitmaps an application to look like Windows themes and 9-slice-scaling with charts.

Another units

These units come with BGRA Controls and contains more functionality that is sometimes used with the controls, sometimes not but are usefull in some way. Some are listed here, others you can see linked directly with any control like bcrtti, bcstylesform, bctools and bctypes.

BCEffect

Fading effect with BGRABitmap.

BCFilters

A set of pixel filters to use with BGRABitmap.

BGRAScript

Scripting with BGRABitmap, see test project.

Related Articles

BGRASpriteAnimation - Usage of the sprite animation component.

uE_Controls - Other controls developed with BGRABitmap.

BGRABitmap - The library used to create this controls.

LazPaint - A paint program developed with Lazarus and BGRABitmap.