Gorgon Game Engine
Language.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include "../../Scripting.h"
6 
7 
8 namespace Gorgon { namespace Scripting { namespace Compilers {
9 
12  int GetPrecedence(const std::string &op) {
13  if(op=="") {
14  return -1;
15  }
16 
17  if(op.length()==1) {
18  switch(op[0]) {
19  case '^':
20  return 4;
21 
22  case '*':
23  case '/':
24  return 6;
25 
26  case '+':
27  case '-':
28  return 9;
29 
30  case '<':
31  case '>':
32  case '=':
33  return 12;
34 
35  case '&':
36  return 13;
37 
38  case '|':
39  return 14;
40 
41  default:
42  return -1;
43  }
44  }
45  else if(op.length()==2) {
46  if(op[1]=='=') {
47  switch(op[0]) {
48  case '>':
49  case '<':
50  case '!':
51  case '=':
52  return 12;
53 
54  default:
55  return -1;
56  }
57  }
58  }
59 
60  if(op=="<<" || op==">>" || op=="shl" || op=="shr" || op=="rol" || op=="ror") {
61  return 5;
62  }
63  else if(op=="band" || op=="bor" || op=="bxor" || op=="bittest") {
64  return 9;
65  }
66  else if(op=="bitset" || op=="bitunset" || op=="contains" || op=="in" || op=="notin" || op=="union" || op=="intersect") {
67  return 8;
68  }
69  else if(op=="mod") {
70  return 6;
71  }
72  else if(op=="and" || op=="xor") {
73  return 13;
74  }
75  else if(op=="or") {
76  return 14;
77  }
78 
79  return -1;
80  }
81 
82 } } }
Gorgon::UI::Disabled
@ Disabled
Component is visible when the widget is disabled.
Definition: Template.h:184
Gorgon::Widgets::SimpleGenerator::BottomPanel
virtual UI::Template BottomPanel() override
Definition: Generator.cpp:1318
Gorgon::Scripting::Instruction::JumpOffset
int JumpOffset
Definition: Instruction.h:175
Gorgon::UI::ComponentTemplate::Automatic
@ Automatic
Given size is not used, object is sized to its contents.
Definition: Template.h:634
Gorgon::Widgets::Generator
Generators create templates for widgets.
Definition: Generator.h:16
Gorgon::Widgets::SimpleGenerator::DownBG
Graphics::BitmapRectangleProvider & DownBG()
Definition: Generator.cpp:269
Gorgon::Widgets::SimpleGenerator::HoverBorder
Graphics::BitmapRectangleProvider & HoverBorder()
Definition: Generator.cpp:178
Gorgon::Input::Mouse::None
@ None
Definition: Mouse.h:32
Gorgon::UI::ContainerTemplate::AddIndex
ContainerTemplate & AddIndex(int componentindex)
Adds an index to the container.
Definition: Template.h:1761
Gorgon::Widgets::SimpleGenerator::Inputbox
virtual UI::Template Inputbox() override
Definition: Generator.cpp:1322
Gorgon::Widgets::SimpleGenerator::BorderInfo::Width
int Width
Definition: Generator.h:264
Gorgon::Widgets::SimpleGenerator::DownBorder
Graphics::BitmapRectangleProvider & DownBorder()
Definition: Generator.cpp:188
Gorgon::Graphics::RGBA
This class represents a color information.
Definition: Color.h:91
Gorgon::CGI::SolidFill
Fills a drawing with a solid color.
Definition: CGI.h:11
Gorgon::Graphics::RGBA::Blend
void Blend(const RGBA &color)
Blends the given color into this one.
Definition: Color.h:248
Gorgon::String::From
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, std::string >::type From(const T_ &e)
Definition: Enum.h:303
Gorgon::UI::Even
@ Even
In lists denotes the item is in even position.
Definition: Template.h:230
Gorgon::Scripting::Compilers::Intermediate::Compile
virtual unsigned Compile(const std::string &input, unsigned long pline) override
Asks the compiler to compile the given input.
Definition: IL.cpp:161
Gorgon::Graphics::EmptyImage::Instance
static EmptyImage & Instance()
Returns the instance for empty image. Only one instance is enough.
Definition: EmptyImage.h:50
Gorgon::Widgets::SimpleGenerator::Label
virtual UI::Template Label() override
Definition: Generator.cpp:1064
Gorgon::UI::ContainerTemplate::Background
VisualProvider Background
Background graphics.
Definition: Template.h:1810
Gorgon::Widgets::SimpleGenerator::ForecolorInfo::Disabled
Graphics::RGBA Disabled
Definition: Generator.h:288
Gorgon::Widgets::SimpleGenerator::HoverEditBorder
Graphics::BitmapRectangleProvider & HoverEditBorder()
Definition: Generator.cpp:230
Gorgon::UI::ComponentTemplate::SetValueModification
void SetValueModification(ValueModification mod, ValueSource source=UseFirst, std::array< float, 4 > min={{0, 0, 0, 0}}, std::array< float, 4 > max={{1, 1, 1, 1}})
Sets the property that will be affected by the value of the widget.
Definition: Template.h:1099
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Groove
Graphics::RGBA Groove
Definition: Generator.h:281
Gorgon::UI::ComponentTemplate::ContentsTag
@ ContentsTag
Definition: Template.h:872
Gorgon::Scripting::InstructionType::FunctionCall
@ FunctionCall
Marks instruction as a regular function call.
Gorgon::Widgets::SimpleGenerator::HoverStraightBG
Graphics::BitmapRectangleProvider & HoverStraightBG()
Definition: Generator.cpp:306
Gorgon::UI::ComponentTemplate::SetMargin
void SetMargin(int value, Dimension::Unit unit=Dimension::Pixel)
Changes the margin of the component.
Definition: Template.h:992
Gorgon::UI::ComponentTemplate::Icon
@ Icon
Data will effect the displayed graphics.
Definition: Template.h:678
Gorgon::Scripting::Scope::ReadInstruction
const Instruction * ReadInstruction(unsigned long line)
Reads the instruction in the given line.
Definition: Scope.cpp:5
Gorgon::Widgets::SimpleGenerator::Progressbar
virtual UI::Template Progressbar() override
Definition: Generator.cpp:1442
Gorgon::UI::ComponentTemplate::Absolute
@ Absolute
Absolute positioning, coordinates will start from the container.
Definition: Template.h:619
Gorgon::Graphics::BitmapAnimationProvider
basic_TextureAnimationProvider< Bitmap, basic_TextureAnimation, basic_AnimationFrame< Bitmap > > BitmapAnimationProvider
Definition: TextureAnimation.h:520
Gorgon::UI::ComponentTemplate::UseTransition
@ UseTransition
This channel will give the progress of a transition.
Definition: Template.h:809
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Selected
Graphics::RGBA Selected
Definition: Generator.h:283
Gorgon::Geometry::PointList::Pop
void Pop()
Removes the last point from the list.
Definition: PointList.h:184
Gorgon::Widgets::Registry::Listbox_Regular
@ Listbox_Regular
Definition: Registry.h:47
Gorgon::UI::ComponentTemplate::ModifyAlpha
@ ModifyAlpha
Value modifies the opacity of the component.
Definition: Template.h:709
Gorgon::Widgets::SimpleGenerator::NormalBG
Graphics::BitmapRectangleProvider & NormalBG()
Definition: Generator.cpp:252
Gorgon::Widgets::SimpleGenerator::AltStraightBG
Graphics::BitmapRectangleProvider & AltStraightBG()
Definition: Generator.cpp:296
Gorgon::Widgets::SimpleGenerator::CheckboxButton
virtual UI::Template CheckboxButton() override
Definition: Generator.cpp:872
Gorgon::Widgets::SimpleGenerator::HoverRBG
Graphics::BitmapRectangleProvider & HoverRBG()
Definition: Generator.cpp:343
Gorgon::CGI::DrawLines
void DrawLines(Containers::Image &target, const Geometry::PointList< P_ > &p, StrokeSettings settings=1.0, F_ stroke=SolidFill<>{Graphics::Color::Black})
Draw a point list as a list of lines.
Definition: Line.h:182
Gorgon::UI::MiddleLeft
@ MiddleLeft
Middle left.
Definition: Template.h:48
Gorgon::Widgets::SimpleGenerator::NormalEmptyBorder
Graphics::BitmapRectangleProvider & NormalEmptyBorder()
Definition: Generator.cpp:411
Gorgon::Widgets::SimpleGenerator::BlankLayerbox
virtual UI::Template BlankLayerbox() override
Definition: Generator.cpp:1476
Gorgon::Scripting::Scope
A new scope is created automatically when a new input source or a function like construct is created.
Definition: Scope.h:62
Gorgon::UI::Template
This class stores visual information about a widget template.
Definition: Template.h:392
Gorgon::Widgets::SimpleGenerator::IconButton
virtual UI::Template IconButton(Geometry::Size iconsize={-1, -1}) override
Generates a button template with the given default size.
Definition: Generator.cpp:648
Gorgon::Widgets::SimpleGenerator::ErrorLabel
virtual UI::Template ErrorLabel() override
Definition: Generator.cpp:1098
Gorgon::UI::TopCenter
@ TopCenter
Top center.
Definition: Template.h:43
Gorgon::Widgets::SimpleGenerator::ObjectHeight
int ObjectHeight
Definition: Generator.h:242
Gorgon::UI::Template::AddGraphics
GraphicsTemplate & AddGraphics(int index, ComponentCondition cond)
This will create a new drawable and return it.
Definition: Template.h:442
Gorgon::Scripting::Compilers::ExtractQuotes
std::string ExtractQuotes(const std::string &input, int &ch)
Extracts a string that is in quotes.
Definition: Utils.h:44
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Panel
Graphics::RGBA Panel
Definition: Generator.h:279
Gorgon::Scripting::Data::GetValue
std::enable_if<!std::is_pointer< T_ >::value, const typename std::remove_reference< T_ >::type & >::type GetValue() const
Returns the value of this data in the requested format.
Definition: Data.h:57
Gorgon::OS::GetEnvVar
std::string GetEnvVar(const std::string &var)
Returns the value of an environment variable.
Definition: Linux.cpp:17
Gorgon::UI::Ch4V1
@ Ch4V1
Channel 4 value is 1, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:302
Gorgon::Widgets::SimpleGenerator::PanelBorder
Graphics::BitmapRectangleProvider & PanelBorder(int missingedge=0)
Definition: Generator.cpp:209
Gorgon::UI::Hover
@ Hover
Mouse is over the widget, or over a particular repeat.
Definition: Template.h:193
Gorgon::Geometry::basic_Size::Height
T_ Height
Height of this size object.
Definition: Size.h:261
Gorgon::Graphics::Slice
BitmapRectangleProvider Slice(const Bitmap &source, Geometry::Bounds center)
Slices an image to create a rectangle.
Definition: Rectangle.h:610
Gorgon::Graphics::ColorMode::RGBA
@ RGBA
32bit red, green, blue and alpha channel image. Red component is in the lowest byte order and
Gorgon::Widgets::SimpleGenerator::NormalRBG
Graphics::BitmapRectangleProvider & NormalRBG()
Definition: Generator.cpp:336
Gorgon::Scripting::Instruction::Reference
bool Reference
Definition: Instruction.h:170
Gorgon::Widgets::SimpleGenerator::Init
void Init(int fontsize=14, std::string fontname="")
Initializes the generator.
Definition: Generator.cpp:30
Gorgon::UI::ContainerTemplate::SetBorderSize
void SetBorderSize(int value)
Changes the border size of the component.
Definition: Template.h:1694
Gorgon::UI::TopLeft
@ TopLeft
Top left.
Definition: Template.h:41
Gorgon::OS::Start
bool Start(const std::string &name, const std::vector< std::string > &args=std::vector< std::string >())
Starts the given application.
Definition: Linux.cpp:116
Gorgon::Widgets::SimpleGenerator::DisabledRBG
Graphics::BitmapRectangleProvider & DisabledRBG()
Definition: Generator.cpp:363
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Regular
Graphics::RGBA Regular
Definition: Generator.h:272
Gorgon::Widgets::SimpleGenerator::ForecolorInfo::Error
Graphics::RGBA Error
Definition: Generator.h:291
Gorgon::UI::ComponentTemplate::SetDataEffect
void SetDataEffect(DataEffect effect)
Sets the data effect for this component. Default is None.
Definition: Template.h:1076
Gorgon::Scripting::Instruction::RHS
Value RHS
The value that will be assigned to the variable.
Definition: Instruction.h:165
Gorgon::UI::ComponentTemplate::SetClip
void SetClip(bool value)
Whether to clip the contents of this container, default value is false.
Definition: Template.h:1267
Gorgon::Widgets::SimpleGenerator::UpdateDimensions
void UpdateDimensions()
This function will update default widget dimensions.
Definition: Generator.cpp:132
Gorgon::Graphics::GlyphRenderer::GetLineGap
virtual float GetLineGap() const =0
This is the default distance between two consecutive lines.
Gorgon::UI::HScroll
@ HScroll
There is space horizontally to be scrolled.
Definition: Template.h:248
Gorgon::Scripting::Instruction::Name
Value Name
Name of the function or variable.
Definition: Instruction.h:162
Gorgon::UI::Template::SetSize
void SetSize(int w, int h)
Changes the size of the template.
Definition: Template.h:508
Gorgon::Widgets::SimpleGenerator::GrooveBorder
Graphics::BitmapRectangleProvider & GrooveBorder()
Definition: Generator.cpp:216
Gorgon::UI::Template::AddTextholder
TextholderTemplate & AddTextholder(int index, ComponentCondition cond)
This will create a new textholder and return it.
Definition: Template.h:430
Gorgon::Scripting::InstructionType::Assignment
@ Assignment
Marks instruction as an assignment.
Utils.h
Gorgon::Filesystem::Join
std::string Join(std::string path1, const std::string &path2)
Joins two given paths or a path and filename.
Definition: Filesystem.h:154
Gorgon::Geometry::Size
basic_Size< int > Size
Definition: Size.h:385
Gorgon::Scripting::Compilers::GetPrecedence
int GetPrecedence(const std::string &op)
Returns the precedence of the given operator.
Definition: Language.h:12
Gorgon::UI::Opened
@ Opened
This condition is triggered when the widget is opened like a combobox showing its list part.
Definition: Template.h:213
Gorgon::Graphics::RGBA::A
Byte A
Alpha channel.
Definition: Color.h:312
Gorgon::Widgets::SimpleGenerator::Listbox
virtual UI::Template Listbox() override
Definition: Generator.cpp:1598
Gorgon::Widgets::SimpleGenerator::RadioButton
virtual UI::Template RadioButton() override
Definition: Generator.cpp:968
Gorgon::UI::Dimension::Pixel
@ Pixel
Fixed pixel based dimensions.
Definition: Dimension.h:18
Gorgon::UI::ComponentTemplate::ModifyWidth
@ ModifyWidth
Width of this component will be affected.
Definition: Template.h:739
Gorgon::Scripting::Data::GetType
const Type & GetType() const
Returns the type of the data.
Definition: Data.h:173
Gorgon::UI::ComponentTemplate::SetPositioning
void SetPositioning(PositionType value)
Changes the positioning method of the component.
Definition: Template.h:925
Gorgon::Widgets::SimpleGenerator::Dropdown
virtual UI::Template Dropdown() override
Definition: Generator.cpp:1748
Gorgon::UI::ComponentTemplate::HScrollTag
@ HScrollTag
Definition: Template.h:856
Gorgon::UI::ComponentTemplate::Text
@ Text
Works only for TextholderTemplate, data will affect the text that is displayed.
Definition: Template.h:651
Gorgon::Widgets::SimpleGenerator::LeftPanel
virtual UI::Template LeftPanel() override
Definition: Generator.cpp:1310
Gorgon::Widgets::SimpleGenerator::HScrollbar
virtual UI::Template HScrollbar() override
Definition: Generator.cpp:1561
Gorgon::Graphics::StyledRenderer::GetGlyphRenderer
GlyphRenderer & GetGlyphRenderer()
Definition: Font.h:472
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::Geometry::basic_Size
This class represents a 2D geometric size.
Definition: Size.h:23
Gorgon::Geometry::Margin
basic_Margin< int > Margin
Definition: Margin.h:289
Gorgon::Widgets::SimpleGenerator::BorderInfo::Divisions
int Divisions
Definition: Generator.h:266
Gorgon::Graphics::RGBA::BlendWith
RGBA BlendWith(const RGBA &color) const
Blends the current color with the given color and returns the result.
Definition: Color.h:279
Gorgon::Char
uint32_t Char
Definition: Types.h:46
Gorgon::Scripting::Value::Name
std::string Name
Used for variables and constants.
Definition: Instruction.h:84
Gorgon::Widgets::SimpleGenerator::Panel
virtual UI::Template Panel() override
Definition: Generator.cpp:1300
Gorgon::Widgets::SimpleGenerator::~SimpleGenerator
virtual ~SimpleGenerator()
Definition: Generator.cpp:93
Gorgon::Widgets::SimpleGenerator::Border
struct Gorgon::Widgets::SimpleGenerator::BorderInfo Border
Gorgon::UI::VisualProvider::SetDrawable
void SetDrawable(const Graphics::Drawable &value)
Sets the content from a drawable.
Definition: Template.h:1553
Gorgon::Scripting::Compilers::Disassemble
std::string Disassemble(const Instruction *)
Disassembles the given instruction.
Definition: Generator.cpp:55
Gorgon::Widgets::SimpleGenerator::BorderInfo::Radius
int Radius
Definition: Generator.h:265
Gorgon::UI::ComponentTemplate::ViewPortTag
@ ViewPortTag
Definition: Template.h:873
Gorgon::UI::TopRight
@ TopRight
Top right.
Definition: Template.h:45
Gorgon::UI::ComponentTemplate::VScrollTag
@ VScrollTag
Definition: Template.h:857
Gorgon::Widgets::SimpleGenerator::BorderInfo::Disabled
Graphics::RGBA Disabled
Definition: Generator.h:268
Gorgon::UI::ComponentTemplate::ListTag
@ ListTag
Definition: Template.h:879
ASSERT
#define ASSERT(expression, message,...)
Replaces regular assert to allow messages and backtrace.
Definition: Assert.h:161
Gorgon::UI::VScroll
@ VScroll
There is space vertically to be scrolled.
Definition: Template.h:251
Gorgon::UI::Template::GetWidth
int GetWidth() const
Returns the size of the template.
Definition: Template.h:525
Gorgon::Widgets::SimpleGenerator::DisabledBorder
Graphics::BitmapRectangleProvider & DisabledBorder()
Definition: Generator.cpp:198
Gorgon::UI::ComponentTemplate::DragTag
@ DragTag
Definition: Template.h:858
Gorgon::UI::TextholderTemplate::SetRenderer
void SetRenderer(const Graphics::TextRenderer &value)
Changes the renderer.
Definition: Template.h:1440
Gorgon::Scripting::Value::Literal
Data Literal
Used for literal values.
Definition: Instruction.h:87
Gorgon::Widgets::SimpleGenerator::SimpleGenerator
SimpleGenerator()
Creates a non-working simple generator.
Definition: Generator.h:140
Gorgon::Widgets::SimpleGenerator::Focus
struct Gorgon::Widgets::SimpleGenerator::FocusInfo Focus
Gorgon::UI::ComponentTemplate::DragBarTag
@ DragBarTag
Definition: Template.h:860
Gorgon::UI::Template::AddPlaceholder
PlaceholderTemplate & AddPlaceholder(int index, ComponentCondition cond)
This will create a new placeholder and return it.
Definition: Template.h:422
Gorgon::String::Trim
std::string Trim(std::string str, const std::string &chars=" \t\n\r")
Strips whitespace around the given string both from start and end.
Definition: String.h:370
Gorgon::Widgets::SimpleGenerator::DownRBG
Graphics::BitmapRectangleProvider & DownRBG()
Definition: Generator.cpp:353
Gorgon::Graphics::Bitmap
This object contains an bitmap image.
Definition: Bitmap.h:25
Gorgon::Scripting::Instruction::Type
InstructionType Type
Type of the instruction.
Definition: Instruction.h:159
Gorgon::Graphics::basic_MaskedObjectProvider
This object creates a masked object from two graphics object.
Definition: MaskedObject.h:109
Gorgon::Widgets::SimpleGenerator::GrooveBG
Graphics::BitmapRectangleProvider & GrooveBG()
Definition: Generator.cpp:373
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Disabled
Graphics::RGBA Disabled
Definition: Generator.h:276
Gorgon::String::Extract
std::string Extract(std::string &original, const std::string &marker, bool trim=false)
Extracts the part of the string up to the given marker.
Definition: String.h:779
Gorgon::Widgets::Registry::Scrollbar_Horizontal
@ Scrollbar_Horizontal
Definition: Registry.h:44
Gorgon::UI::BottomCenter
@ BottomCenter
Bottom center.
Definition: Template.h:58
Gorgon::Scripting::Value
This class contains a parsed value.
Definition: Instruction.h:82
Gorgon::Widgets::SimpleGenerator::RightPanel
virtual UI::Template RightPanel() override
Definition: Generator.cpp:1314
Gorgon::UI::ComponentTemplate::ModifyPositionAndSize
@ ModifyPositionAndSize
This is a combined modification of position and size.
Definition: Template.h:751
Gorgon::Widgets::SimpleGenerator::Button
virtual UI::Template Button() override
Generates a button template.
Definition: Generator.cpp:557
Gorgon::Geometry::Pointf
basic_Point< Float > Pointf
Definition: Point.h:601
Gorgon::Widgets::SimpleGenerator::FocusInfo::Width
int Width
Definition: Generator.h:258
Gorgon::Widgets::SimpleGenerator::NormalBorder
Graphics::BitmapRectangleProvider & NormalBorder()
Definition: Generator.cpp:171
Gorgon::Graphics::MaskedObjectProvider
basic_MaskedObjectProvider< RectangularAnimationProvider > MaskedObjectProvider
Definition: MaskedObject.h:342
Gorgon::Widgets::SimpleGenerator::VScrollbar
virtual UI::Template VScrollbar() override
Definition: Generator.cpp:1523
Gorgon::Scripting::Value::Result
Byte Result
Used for temporary results.
Definition: Instruction.h:93
Gorgon::UI::VisualProvider::SetAnimation
void SetAnimation(const Graphics::AnimationProvider &value)
Sets the content from an animation provider.
Definition: Template.h:1561
Gorgon::Widgets::SimpleGenerator::WidgetHeight
int WidgetHeight
This is the height of a non-bordered widget.
Definition: Generator.h:304
Gorgon::UI::Ch1V0
@ Ch1V0
Channel 1 value is 0, the value will be rounded to 4 decimal points before comparison.
Definition: Template.h:258
Gorgon::Graphics::Orientation::Vertical
@ Vertical
Gorgon::Graphics::RGBA::B
Byte B
Blue channel.
Definition: Color.h:309
Gorgon::UI::Template::AddContainer
ContainerTemplate & AddContainer(int index, ComponentCondition cond)
This will create a new drawable and return it.
Definition: Template.h:450
Gorgon::Geometry::basic_Point
This class represents a 2D point.
Definition: Point.h:32
Gorgon::UI::ComponentTemplate::Fixed
@ Fixed
The given size is absolute, it is not affected by the contents.
Definition: Template.h:631
Gorgon::Graphics::StyledRenderer::SetGlyphRenderer
void SetGlyphRenderer(GlyphRenderer &renderer)
Definition: Font.h:476
Gorgon::UI::ComponentTemplate::SetSizing
void SetSizing(SizingMode value)
Changes the sizing mode of the component.
Definition: Template.h:974
Gorgon::Graphics::RectangleProvider
basic_RectangleProvider< RectangularAnimationProvider > RectangleProvider
Definition: Rectangle.h:588
Gorgon::UI::ComponentCondition
ComponentCondition
Controls the condition when the components are visible.
Definition: Template.h:174
Gorgon::Widgets::SimpleGenerator::FocusInfo::Color
Graphics::RGBA Color
Definition: Generator.h:257
Gorgon::Graphics::RGBA::G
Byte G
Green channel.
Definition: Color.h:306
Gorgon::Widgets::SimpleGenerator::DownStraightBG
Graphics::BitmapRectangleProvider & DownStraightBG()
Definition: Generator.cpp:316
Gorgon::UI::MiddleRight
@ MiddleRight
Middle right.
Definition: Template.h:53
Gorgon::Byte
unsigned char Byte
Represents smallest cell in memory.
Definition: Types.h:9
Gorgon::Widgets::SimpleGenerator::Density
float Density
This controls the automatic spacing.
Definition: Generator.h:308
Gorgon::Widgets::SimpleGenerator::DisabledStraightBG
Graphics::BitmapRectangleProvider & DisabledStraightBG()
Definition: Generator.cpp:326
Gorgon::Widgets::SimpleGenerator::NormalStraightBG
Graphics::BitmapRectangleProvider & NormalStraightBG()
Definition: Generator.cpp:289
Gorgon::UI::State2
@ State2
Second state of the widget, first state is Always.
Definition: Template.h:201
Gorgon::Scripting::InstructionType::MethodCall
@ MethodCall
Marks this instruction as a method call.
Gorgon::Widgets::SimpleGenerator::HoverBG
Graphics::BitmapRectangleProvider & HoverBG()
Definition: Generator.cpp:259
Gorgon::Graphics::basic_RectangleProvider
This class allows instancing of a rectangle like image that is made out of three parts.
Definition: Rectangle.h:185
Gorgon::Scripting::ValueType::Literal
@ Literal
This is a literal value.
Gorgon::Widgets::SimpleGenerator::FocusBorder
Graphics::RectangleProvider & FocusBorder()
Definition: Generator.cpp:404
Gorgon::Scripting::Compilers::Base::List
std::vector< Instruction > List
The instructions that are compiled.
Definition: Compilers.h:51
Gorgon::Widgets::SimpleGenerator::ObjectBorder
int ObjectBorder
Definition: Generator.h:243
Gorgon::Widgets::SimpleGenerator::TopPanel
virtual UI::Template TopPanel() override
Definition: Generator.cpp:1306
Gorgon::UI::Template::GetHeight
int GetHeight() const
Returns the size of the template.
Definition: Template.h:530
Gorgon::UI::ComponentTemplate::ShrinkOnly
@ ShrinkOnly
Given size is the maximum, if the contents are smaller, the object be resized.
Definition: Template.h:642
Gorgon::UI::ComponentTemplate::SetSize
void SetSize(int w, int h, Dimension::Unit unit=Dimension::Pixel)
Changes the size of the component. The given values are ignored if the sizing mode is Automatic.
Definition: Template.h:952
Gorgon::UI::ComponentTemplate::SetTag
void SetTag(Tag value)
Changes the tag of this component.
Definition: Template.h:1144
Gorgon::Widgets::SimpleGenerator::CenteredFont
Graphics::StyledRenderer CenteredFont
Definition: Generator.h:254
Gorgon::Scripting::Compilers::disassemblevalue
std::string disassemblevalue(const Value &value)
Definition: Generator.cpp:8
Gorgon::Graphics::BitmapRectangleProvider
basic_RectangleProvider< Bitmap > BitmapRectangleProvider
Definition: Rectangle.h:590
Gorgon::Widgets::SimpleGenerator::BorderedWidgetHeight
int BorderedWidgetHeight
This is the height of a bordered widget.
Definition: Generator.h:301
Gorgon::Widgets::SimpleGenerator::UpdateBorders
void UpdateBorders(bool smooth=true)
This function will update default widget borders depending on the font size.
Definition: Generator.cpp:154
Gorgon::UI::Focused
@ Focused
Widget has the focus.
Definition: Template.h:190
Gorgon::UI::ComponentTemplate::AbsoluteSliding
@ AbsoluteSliding
Absolute positioning, coordinates will start from the container, percent based movement will move to ...
Definition: Template.h:615
Gorgon::UI::MiddleCenter
@ MiddleCenter
Middle center, using this position ensures that the components will be inside each other.
Definition: Template.h:51
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Hover
Graphics::RGBA Hover
Definition: Generator.h:274
Gorgon::Geometry::basic_Size::Width
T_ Width
Width of this size object.
Definition: Size.h:258
Gorgon::UI::ComponentTemplate::ItemTag
@ ItemTag
Definition: Template.h:876
Gorgon::UI::Template::AddIgnored
IgnoredTemplate & AddIgnored(int index, ComponentCondition cond)
This will create a new ignored template.
Definition: Template.h:434
Gorgon::Scripting::ValueType::Identifier
@ Identifier
Marks this value as an identifier, either a constant or a variable.
Gorgon::Widgets::SimpleGenerator::Checkbox
virtual UI::Template Checkbox() override
Definition: Generator.cpp:754
Gorgon::Widgets::SimpleGenerator::BlankPanel
virtual UI::Template BlankPanel() override
Definition: Generator.cpp:1132
Gorgon::Graphics::RGBA::R
Byte R
Red channel.
Definition: Color.h:303
Gorgon::Widgets::SimpleGenerator::Forecolor
struct Gorgon::Widgets::SimpleGenerator::ForecolorInfo Forecolor
Gorgon::Graphics::GlyphRenderer::GetHeight
virtual int GetHeight() const =0
Height of glyphs, actual size could be smaller but all glyphs should have the same virtual height.
Gorgon::Widgets::Registry::Scrollbar_Vertical
@ Scrollbar_Vertical
Definition: Registry.h:45
Gorgon::Widgets::SimpleGenerator::RegularFont
Graphics::StyledRenderer RegularFont
Definition: Generator.h:253
Gorgon::Graphics::BlankImage
Pure color blank image, default size is 0x0, but can be drawn with any size.
Definition: BlankImage.h:13
Gorgon::Scripting::ValueType::Variable
@ Variable
This is a variable.
Gorgon::Widgets::SimpleGenerator::ForecolorInfo::Regular
Graphics::RGBA Regular
Definition: Generator.h:287
Gorgon::UI::ComponentTemplate::UseXW
@ UseXW
Definition: Template.h:824
Gorgon::Widgets::Registry::operator[]
const UI::Template & operator[](TemplateType type)
Returns the template for the requested type.
Definition: Registry.h:80
Gorgon::Scripting::Instruction::Store
Byte Store
Whether to store the result of the function.
Definition: Instruction.h:174
Gorgon::Widgets::SimpleGenerator::Spacing
int Spacing
Definition: Generator.h:241
Gorgon::Graphics::StyledRenderer::AlignCenter
void AlignCenter()
Aligns the text to the center, removes justify.
Definition: Font.h:625
Gorgon::Widgets::SimpleGenerator::ObjectShape
Graphics::BitmapRectangleProvider & ObjectShape()
Definition: Generator.cpp:382
Gorgon::Widgets::SimpleGenerator::ForecolorInfo::Down
Graphics::RGBA Down
Definition: Generator.h:290
Gorgon::Widgets::SimpleGenerator::InnerObjectShape
Graphics::MaskedObjectProvider & InnerObjectShape()
Definition: Generator.cpp:391
Gorgon::Scripting::Value::Type
ValueType Type
Type of this value.
Definition: Instruction.h:90
Gorgon::Widgets::SimpleGenerator::ShapeBorder
float ShapeBorder
Definition: Generator.h:244
Gorgon::Scripting::InstructionType::Jump
@ Jump
Unconditionally jumps by the given offset. Offset should be in JumpOffset field.
Gorgon::Widgets::SimpleGenerator::WidgetWidth
int WidgetWidth
This is the width of a one cell widget.
Definition: Generator.h:298
Gorgon::Widgets::SimpleGenerator::FocusInfo::Spacing
int Spacing
Definition: Generator.h:260
Gorgon::Scripting::Instruction::Parameters
std::vector< Value > Parameters
Parameters of the function.
Definition: Instruction.h:168
Gorgon::CGI::Polyfill
void Polyfill(Containers::Image &target, const std::vector< Geometry::PointList< P_ >> &p, F_ fill=SolidFill<>{Graphics::Color::Black})
This function fills the given point list as a polygon.
Definition: Polygon.h:164
Gorgon::UI::PlaceholderTemplate::SetTemplate
void SetTemplate(const Template &value)
Sets the sub template for this placeholder.
Definition: Template.h:1384
Gorgon::UI::ComponentTemplate::Icon1
@ Icon1
Definition: Template.h:679
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Down
Graphics::RGBA Down
Definition: Generator.h:275
Gorgon::Graphics::Bitmap::ForAllPixels
void ForAllPixels(std::function< void(int, int)> fn) const
Loops through all pixels of the image, giving coordinates to your function.
Definition: Bitmap.h:622
Gorgon::Widgets::SimpleGenerator::BorderInfo::Color
Graphics::RGBA Color
Definition: Generator.h:267
Gorgon::Widgets::SimpleGenerator::Layerbox
virtual UI::Template Layerbox() override
Definition: Generator.cpp:1498
Gorgon::UI::Reversed
@ Reversed
For widgets that can have reversed state.
Definition: Template.h:224
Gorgon::Scripting::Compilers::CheckInputFor
int CheckInputFor(const std::string &input, int &ch, P_ ...args)
Checks if the input string contains one of the given characters at current point.
Definition: Utils.h:9
Gorgon::UI::GraphicsTemplate::Content
VisualProvider Content
Graphical representation of the template.
Definition: Template.h:1644
Gorgon::Widgets::SimpleGenerator::DisabledBG
Graphics::BitmapRectangleProvider & DisabledBG()
Definition: Generator.cpp:279
Generator.h
Gorgon::Scripting::Instruction
A single instruction.
Definition: Instruction.h:150
Gorgon::Graphics::Bitmap::Clear
void Clear()
Cleans the contents of the buffer by setting every byte it contains to 0.
Definition: Bitmap.h:730
Gorgon::Graphics::FreeType
This class allows using font files for text rendering.
Definition: FreeType.h:49
Gorgon::Widgets::SimpleGenerator::Background
struct Gorgon::Widgets::SimpleGenerator::BackgroundInfo Background
Gorgon::Geometry::PointList
This class represents a set of points.
Definition: PointList.h:17
Gorgon::UI::Template::SetSpacing
void SetSpacing(int value)
Sets the spacing required for this template.
Definition: Template.h:571
Gorgon::UI::Always
@ Always
Component is always active.
Definition: Template.h:176
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Edit
Graphics::RGBA Edit
Definition: Generator.h:278
Gorgon::Widgets::SimpleGenerator::ForecolorInfo::Hover
Graphics::RGBA Hover
Definition: Generator.h:289
Gorgon::UI::Icon1IsSet
@ Icon1IsSet
Data effect of the component is set.
Definition: Template.h:349
Gorgon::Geometry::basic_Point::FromVector
static basic_Point FromVector(Float magnitute, Float angle, const basic_Point< O_ > &origin={0, 0})
Creates a new point from the given vector data.
Definition: Point.h:109
Gorgon::Graphics::GlyphRenderer::GetLineThickness
virtual float GetLineThickness() const =0
Should return the average thickness of a line.
Gorgon::Widgets::SimpleGenerator::BackgroundInfo::Alternate
Graphics::RGBA Alternate
Definition: Generator.h:273
Gorgon::UI::Readonly
@ Readonly
Component is visible when the widget is readonly.
Definition: Template.h:187
Gorgon::Widgets::SimpleGenerator::ReadonlyBorder
Graphics::BitmapRectangleProvider & ReadonlyBorder()
Definition: Generator.cpp:241
Gorgon::Graphics::GlyphRenderer::GetLetterHeight
virtual std::pair< int, int > GetLetterHeight(bool asciionly=false) const =0
Returns the offset (first) and maximum height (second) that is used by letters.
Gorgon::Input::Keyboard::Keycodes::Down
constexpr Key Down
Definition: Keyboard.h:65
Gorgon::Widgets::SimpleGenerator::NormalEditBorder
Graphics::BitmapRectangleProvider & NormalEditBorder()
Definition: Generator.cpp:223
Gorgon::UI::Dimension::Percent
@ Percent
Dimension will be relative to the parent and given in percent.
Definition: Dimension.h:22