AMimedData#
Mime-type data associated storage.
Header: | #include <AUI/Util/AMimedData.h> |
CMake: | aui_link(my_target PUBLIC aui::views) |
Public Methods#
setText#
void AMimedData::setText(const AString& text)
Sets "text/plain".
Examples#
examples/app/fractal/src/JumpToCoordsWindow.cpp
Fractal Example - Fractal viewer application demonstrating usage of custom shaders.
auto im = _new<ATextField>();
auto scale = _new<ATextField>();
auto pos = fractalView->getPlotPosition();
re->setText(AString::number(pos.x));
im->setText(AString::number(pos.y));
scale->setText(AString::number(fractalView->getPlotScale()));
setContents(Vertical {
_form({
examples/app/fractal/src/FractalWindow.cpp
Fractal Example - Fractal viewer application demonstrating usage of custom shaders.
}
auto fractal = _new<FractalView>();
connect(fractal->centerPosChanged, this, [centerPosDisplay](const glm::dvec2& newPos, double scale) {
centerPosDisplay->setText("Center position: {} {}, scale: {}"_format(newPos.x, -newPos.y, scale));
});
setContents(Horizontal {
Stacked::Expanding {
fractal,
examples/app/game_of_life/src/main.cpp
Game of Life - Game of Life implementation that uses advanced large dynamic data rendering techniques such as ITexture, AImage to be GPU friendly. The computation is performed in AThreadPool.
examples/app/minesweeper/src/NewGameWindow.cpp
Minesweeper Game - Minesweeper game implementation driven by ass.
case 8:
text += "low";
break;
}
mDifficultyLabel->setText(text);
}
NewGameWindow::NewGameWindow(MinesweeperWindow* minesweeper)
: AWindow("New game", 100, 100, minesweeper), mMinesweeper(minesweeper) {
setWindowStyle(WindowStyle::MODAL);