#include <range/v3/all.hpp>
#include <AUI/Platform/Entry.h>
#include "AUI/Platform/AWindow.h"
#include "AUI/Util/UIBuildingHelpers.h"
#include "AUI/View/AScrollArea.h"
#include "AUI/View/ASpinnerV2.h"
#include "AUI/View/AForEachUI.h"
#include "AUI/Model/AListModel.h"
#include "AUI/Thread/AAsyncHolder.h"
#include "AUI/View/AText.h"
#include "AUI/View/ADrawableView.h"
using namespace declarative;
using namespace ass;
static auto headerWithContents(
_<AView> content) {
auto result = Stacked {
}
let { it->setExtraStylesheet(
{
},
}
); },
Vertical::Expanding {
Centered {
Horizontal {
ATextAlign::CENTER,
},
BoxShadow { 0, 32_dp, 32_dp, AColor::BLACK.transparentize(0.8f) },
},
ATextAlign::CENTER,
AOverflowMask::ROUNDED_RECT,
},
BoxShadow { 0, 32_dp, 32_dp, AColor::BLACK.transparentize(0.8f) },
},
}
},
};
return result;
}
auto window = _new<AWindow>("Backdrop test", 600_dp, 300_dp);
window->setContents(headerWithContents(
Centered {
Vertical::Expanding {
Centered {
AText::fromString(
" — Eh bien, mon prince. Gênes et Lucques ne sont plus que des apanages, des "
"поместья, de la famille Buonaparte. Non, je vous préviens que si vous ne me dites pas "
"que nous avons la guerre, si vous vous permettez encore de pallier toutes les infamies, "
"toutes les atrocités de cet Antichrist (ma parole, j'y crois) — je ne vous connais "
"plus, vous n'êtes plus mon ami, vous n'êtes plus мой верный раб, comme vous dites 1. "
"Ну, здравствуйте, здравствуйте. Je vois que je vous fais peur, садитесь и "
"рассказывайте."),
AText::fromString(
" Так говорила в июле 1805 года известная Анна Павловна Шерер, фрейлина и "
"приближенная императрицы Марии Феодоровны, встречая важного и чиновного князя Василия, "
"первого приехавшего на ее вечер. Анна Павловна кашляла несколько дней, у нее был грипп, "
"как она говорила (грипп был тогда новое слово, употреблявшееся только редкими). В "
"записочках, разосланных утром с красным лакеем, было написано без различия во всех:"),
AText::fromString(
" «Si vous n'avez rien de mieux à faire, Monsieur le comte (или mon prince), et si la "
"perspective de passer la soirée chez une pauvre malade ne vous effraye pas trop, je "
"serai charmée de vous voir chez moi entre 7 et 10 heures. Annette Scherer» 3."),
AText::fromString(
" — Dieu, quelle virulente sortie! 4 — отвечал, нисколько не смутясь такою встречей, "
"вошедший князь, в придворном, шитом мундире, в чулках, башмаках и звездах, с светлым "
"выражением плоского лица."),
AText::fromString(
" Он говорил на том изысканном французском языке, на котором не только говорили, но и "
"думали наши деды, и с теми, тихими, покровительственными интонациями, которые "
"свойственны состаревшемуся в свете и при дворе значительному человеку. Он подошел к "
"Анне Павловне, поцеловал ее руку, подставив ей свою надушенную и сияющую лысину, и "
}));
window->show();
return 0;
}
Definition AStylesheet.h:21
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
@ HIDDEN_FROM_THIS
Like HIDDEN, but view's ASS-styled background is also affected by mask.
Definition AOverflow.h:40
@ VISIBLE
Overflowed contents are visible.
Definition AOverflow.h:28
type_of< T > t
Selects views that are of the specified C++ types.
Definition type_of.h:71
#define let
Performs multiple operations on a single object without repeating its name (in place) This function c...
Definition kAUI.h:262
#define with_style
Allows to define a style to the view right in place.
Definition kAUI.h:287
#define AUI_ENTRY
Application entry point.
Definition Entry.h:90
Fast gaussian blur.
Definition Backdrop.h:84
Represents backdrop filter effect which applied to the pixels behind the view (i.e....
Definition Backdrop.h:32
Represents solid (single color) background.
Definition BackgroundSolid.h:26
Controls border radius.
Definition BorderRadius.h:28
Represents box shadow.
Definition BoxShadow.h:31
Controls the expanding of AView.
Definition Expanding.h:26
Controls the fixed size of AView.
Definition FixedSize.h:26
Controls the max size of AView.
Definition MaxSize.h:29
Controls the padding of AView.
Definition Padding.h:29
Declarative form of ADrawableView.
Definition ADrawableView.h:110
Declarative form of ALabel.
Definition ALabel.h:35