forked from qt-creator/qt-creator
Lua: Rename some 'layout' bits to 'gui'
Change-Id: I1476cfe922c3d95c3c4309531bb4e063b18273e5 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -8,10 +8,10 @@ add_qtc_plugin(Lua
|
|||||||
bindings/async.cpp
|
bindings/async.cpp
|
||||||
bindings/core.cpp
|
bindings/core.cpp
|
||||||
bindings/fetch.cpp
|
bindings/fetch.cpp
|
||||||
|
bindings/gui.cpp
|
||||||
bindings/hook.cpp
|
bindings/hook.cpp
|
||||||
bindings/inheritance.h
|
bindings/inheritance.h
|
||||||
bindings/install.cpp
|
bindings/install.cpp
|
||||||
bindings/layout.cpp
|
|
||||||
bindings/messagemanager.cpp
|
bindings/messagemanager.cpp
|
||||||
bindings/qtcprocess.cpp
|
bindings/qtcprocess.cpp
|
||||||
bindings/settings.cpp
|
bindings/settings.cpp
|
||||||
@@ -28,8 +28,8 @@ add_qtc_plugin(Lua
|
|||||||
meta/async.lua
|
meta/async.lua
|
||||||
meta/core.lua
|
meta/core.lua
|
||||||
meta/fetch.lua
|
meta/fetch.lua
|
||||||
|
meta/gui.lua
|
||||||
meta/install.lua
|
meta/install.lua
|
||||||
meta/layout.lua
|
|
||||||
meta/lsp.lua
|
meta/lsp.lua
|
||||||
meta/messagemanager.lua
|
meta/messagemanager.lua
|
||||||
meta/process.lua
|
meta/process.lua
|
||||||
@@ -56,7 +56,7 @@ set(META_FILES
|
|||||||
meta/async.lua
|
meta/async.lua
|
||||||
meta/core.lua
|
meta/core.lua
|
||||||
meta/fetch.lua
|
meta/fetch.lua
|
||||||
meta/layout.lua
|
meta/gui.lua
|
||||||
meta/lsp.lua
|
meta/lsp.lua
|
||||||
meta/messagemanager.lua
|
meta/messagemanager.lua
|
||||||
meta/process.lua
|
meta/process.lua
|
||||||
|
@@ -220,24 +220,24 @@ std::unique_ptr<Splitter> constructSplitter(const sol::table &children)
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addLayoutModule()
|
void addGuiModule()
|
||||||
{
|
{
|
||||||
LuaEngine::registerProvider("Layout", [](sol::state_view l) -> sol::object {
|
LuaEngine::registerProvider("Gui", [](sol::state_view l) -> sol::object {
|
||||||
const ScriptPluginSpec *pluginSpec = l.get<ScriptPluginSpec *>("PluginSpec");
|
const ScriptPluginSpec *pluginSpec = l.get<ScriptPluginSpec *>("PluginSpec");
|
||||||
QObject *guard = pluginSpec->connectionGuard.get();
|
QObject *guard = pluginSpec->connectionGuard.get();
|
||||||
|
|
||||||
sol::table layout = l.create_table();
|
sol::table gui = l.create_table();
|
||||||
|
|
||||||
layout.new_usertype<Span>(
|
gui.new_usertype<Span>(
|
||||||
"Span", sol::call_constructor, sol::factories(&constructSpan, &constructSpanFromTable));
|
"Span", sol::call_constructor, sol::factories(&constructSpan, &constructSpanFromTable));
|
||||||
|
|
||||||
layout.new_usertype<Space>("Space", sol::call_constructor, sol::constructors<Space(int)>());
|
gui.new_usertype<Space>("Space", sol::call_constructor, sol::constructors<Space(int)>());
|
||||||
|
|
||||||
layout.new_usertype<Stretch>(
|
gui.new_usertype<Stretch>(
|
||||||
"Stretch", sol::call_constructor, sol::constructors<Stretch(int)>());
|
"Stretch", sol::call_constructor, sol::constructors<Stretch(int)>());
|
||||||
|
|
||||||
// Layouts
|
// Layouts
|
||||||
layout.new_usertype<Layout>(
|
gui.new_usertype<Layout>(
|
||||||
"Layout",
|
"Layout",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&construct<Layout>),
|
sol::factories(&construct<Layout>),
|
||||||
@@ -246,33 +246,33 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Object, Thing>());
|
sol::bases<Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Form>(
|
gui.new_usertype<Form>(
|
||||||
"Form",
|
"Form",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&construct<Form>),
|
sol::factories(&construct<Form>),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Layout, Object, Thing>());
|
sol::bases<Layout, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Column>(
|
gui.new_usertype<Column>(
|
||||||
"Column",
|
"Column",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&construct<Column>),
|
sol::factories(&construct<Column>),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Layout, Object, Thing>());
|
sol::bases<Layout, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Row>(
|
gui.new_usertype<Row>(
|
||||||
"Row",
|
"Row",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&construct<Row>),
|
sol::factories(&construct<Row>),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Layout, Object, Thing>());
|
sol::bases<Layout, Object, Thing>());
|
||||||
layout.new_usertype<Flow>(
|
gui.new_usertype<Flow>(
|
||||||
"Flow",
|
"Flow",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&construct<Flow>),
|
sol::factories(&construct<Flow>),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Layout, Object, Thing>());
|
sol::bases<Layout, Object, Thing>());
|
||||||
layout.new_usertype<Grid>(
|
gui.new_usertype<Grid>(
|
||||||
"Grid",
|
"Grid",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&construct<Grid>),
|
sol::factories(&construct<Grid>),
|
||||||
@@ -280,7 +280,7 @@ void addLayoutModule()
|
|||||||
sol::bases<Layout, Object, Thing>());
|
sol::bases<Layout, Object, Thing>());
|
||||||
|
|
||||||
// Widgets
|
// Widgets
|
||||||
layout.new_usertype<PushButton>(
|
gui.new_usertype<PushButton>(
|
||||||
"PushButton",
|
"PushButton",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -289,7 +289,7 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Label>(
|
gui.new_usertype<Label>(
|
||||||
"Label",
|
"Label",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -298,7 +298,7 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Widget>(
|
gui.new_usertype<Widget>(
|
||||||
"Widget",
|
"Widget",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -311,7 +311,7 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Object, Thing>());
|
sol::bases<Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Stack>(
|
gui.new_usertype<Stack>(
|
||||||
"Stack",
|
"Stack",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -320,14 +320,14 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Tab>(
|
gui.new_usertype<Tab>(
|
||||||
"Tab",
|
"Tab",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&constructTab, &constructTabFromTable),
|
sol::factories(&constructTab, &constructTabFromTable),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<TextEdit>(
|
gui.new_usertype<TextEdit>(
|
||||||
"TextEdit",
|
"TextEdit",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -336,7 +336,7 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<SpinBox>(
|
gui.new_usertype<SpinBox>(
|
||||||
"SpinBox",
|
"SpinBox",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -344,13 +344,13 @@ void addLayoutModule()
|
|||||||
}),
|
}),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
layout.new_usertype<Splitter>(
|
gui.new_usertype<Splitter>(
|
||||||
"Splitter",
|
"Splitter",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories(&constructSplitter),
|
sol::factories(&constructSplitter),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
layout.new_usertype<ToolBar>(
|
gui.new_usertype<ToolBar>(
|
||||||
"ToolBar",
|
"ToolBar",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -358,7 +358,7 @@ void addLayoutModule()
|
|||||||
}),
|
}),
|
||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
layout.new_usertype<TabWidget>(
|
gui.new_usertype<TabWidget>(
|
||||||
"TabWidget",
|
"TabWidget",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -367,7 +367,7 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout.new_usertype<Group>(
|
gui.new_usertype<Group>(
|
||||||
"Group",
|
"Group",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
sol::factories([guard](const sol::table &children) {
|
sol::factories([guard](const sol::table &children) {
|
||||||
@@ -376,16 +376,16 @@ void addLayoutModule()
|
|||||||
sol::base_classes,
|
sol::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
sol::bases<Widget, Object, Thing>());
|
||||||
|
|
||||||
layout["br"] = &br;
|
gui["br"] = &br;
|
||||||
layout["st"] = &st;
|
gui["st"] = &st;
|
||||||
layout["empty"] = ∅
|
gui["empty"] = ∅
|
||||||
layout["hr"] = &hr;
|
gui["hr"] = &hr;
|
||||||
layout["noMargin"] = &noMargin;
|
gui["noMargin"] = &noMargin;
|
||||||
layout["normalMargin"] = &normalMargin;
|
gui["normalMargin"] = &normalMargin;
|
||||||
layout["withFormAlignment"] = &withFormAlignment;
|
gui["withFormAlignment"] = &withFormAlignment;
|
||||||
layout["spacing"] = &spacing;
|
gui["spacing"] = &spacing;
|
||||||
|
|
||||||
return layout;
|
return gui;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@@ -32,10 +32,10 @@ QtcPlugin {
|
|||||||
"async.cpp",
|
"async.cpp",
|
||||||
"core.cpp",
|
"core.cpp",
|
||||||
"fetch.cpp",
|
"fetch.cpp",
|
||||||
|
"gui.cpp",
|
||||||
"hook.cpp",
|
"hook.cpp",
|
||||||
"inheritance.h",
|
"inheritance.h",
|
||||||
"install.cpp",
|
"install.cpp",
|
||||||
"layout.cpp",
|
|
||||||
"messagemanager.cpp",
|
"messagemanager.cpp",
|
||||||
"qtcprocess.cpp",
|
"qtcprocess.cpp",
|
||||||
"settings.cpp",
|
"settings.cpp",
|
||||||
@@ -57,8 +57,8 @@ QtcPlugin {
|
|||||||
"async.lua",
|
"async.lua",
|
||||||
"core.lua",
|
"core.lua",
|
||||||
"fetch.lua",
|
"fetch.lua",
|
||||||
|
"gui.lua",
|
||||||
"install.lua",
|
"install.lua",
|
||||||
"layout.lua",
|
|
||||||
"lsp.lua",
|
"lsp.lua",
|
||||||
"messagemanager.lua",
|
"messagemanager.lua",
|
||||||
"process.lua",
|
"process.lua",
|
||||||
|
@@ -28,7 +28,7 @@ void addUtilsModule();
|
|||||||
void addMessageManagerModule();
|
void addMessageManagerModule();
|
||||||
void addProcessModule();
|
void addProcessModule();
|
||||||
void addSettingsModule();
|
void addSettingsModule();
|
||||||
void addLayoutModule();
|
void addGuiModule();
|
||||||
void addQtModule();
|
void addQtModule();
|
||||||
void addCoreModule();
|
void addCoreModule();
|
||||||
void addHookModule();
|
void addHookModule();
|
||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
addMessageManagerModule();
|
addMessageManagerModule();
|
||||||
addProcessModule();
|
addProcessModule();
|
||||||
addSettingsModule();
|
addSettingsModule();
|
||||||
addLayoutModule();
|
addGuiModule();
|
||||||
addQtModule();
|
addQtModule();
|
||||||
addCoreModule();
|
addCoreModule();
|
||||||
addHookModule();
|
addHookModule();
|
||||||
|
@@ -1,22 +1,22 @@
|
|||||||
---@meta Layout
|
---@meta Layout
|
||||||
|
|
||||||
local layout = {}
|
local gui = {}
|
||||||
|
|
||||||
---The base class of all layout classes
|
---The base class of all ui related classes
|
||||||
---@class Object
|
---@class Object
|
||||||
layout.Layout = {}
|
gui.Object = {}
|
||||||
|
|
||||||
---The base class of all layout classes
|
---The base class of all gui layout classes
|
||||||
---@class Layout : Object
|
---@class Layout : Object
|
||||||
layout.Layout = {}
|
gui.Layout = {}
|
||||||
|
|
||||||
---The base class of all widget classes, an empty widget itself.
|
---The base class of all widget classes, an empty widget itself.
|
||||||
---@class Widget : Object
|
---@class Widget : Object
|
||||||
Widget = {}
|
gui.Widget = {}
|
||||||
|
|
||||||
---@param children Layout
|
---@param children Layout
|
||||||
---@return Widget
|
---@return Widget
|
||||||
function layout.Widget(children) end
|
function gui.Widget(children) end
|
||||||
|
|
||||||
---Column layout
|
---Column layout
|
||||||
---@class Column : Layout
|
---@class Column : Layout
|
||||||
@@ -24,14 +24,14 @@ local column = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Column
|
---@return Column
|
||||||
function layout.Column(children) end
|
function gui.Column(children) end
|
||||||
|
|
||||||
---A group box with a title
|
---A group box with a title
|
||||||
---@class Group : Widget
|
---@class Group : Widget
|
||||||
local group = {}
|
local group = {}
|
||||||
|
|
||||||
---@return Group
|
---@return Group
|
||||||
function layout.Group(children) end
|
function gui.Group(children) end
|
||||||
|
|
||||||
---Row layout
|
---Row layout
|
||||||
---@class Row : Layout
|
---@class Row : Layout
|
||||||
@@ -39,7 +39,7 @@ local row = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Row
|
---@return Row
|
||||||
function layout.Row(children) end
|
function gui.Row(children) end
|
||||||
|
|
||||||
---Flow layout
|
---Flow layout
|
||||||
---@class Flow : Layout
|
---@class Flow : Layout
|
||||||
@@ -47,7 +47,7 @@ local flow = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Flow
|
---@return Flow
|
||||||
function layout.Flow(children) end
|
function gui.Flow(children) end
|
||||||
|
|
||||||
---Grid layout
|
---Grid layout
|
||||||
---@class Grid : Layout
|
---@class Grid : Layout
|
||||||
@@ -55,7 +55,7 @@ local grid = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Grid
|
---@return Grid
|
||||||
function layout.Grid(children) end
|
function gui.Grid(children) end
|
||||||
|
|
||||||
---Form layout
|
---Form layout
|
||||||
---@class Form : Layout
|
---@class Form : Layout
|
||||||
@@ -63,7 +63,7 @@ local form = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Form
|
---@return Form
|
||||||
function layout.Form(children) end
|
function gui.Form(children) end
|
||||||
|
|
||||||
|
|
||||||
---A stack of multiple widgets
|
---A stack of multiple widgets
|
||||||
@@ -72,7 +72,7 @@ local stack = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Stack
|
---@return Stack
|
||||||
function layout.Stack(children) end
|
function gui.Stack(children) end
|
||||||
|
|
||||||
---A Tab widget
|
---A Tab widget
|
||||||
---@class Tab : Widget
|
---@class Tab : Widget
|
||||||
@@ -80,7 +80,7 @@ local tab = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Tab
|
---@return Tab
|
||||||
function layout.Tab(children) end
|
function gui.Tab(children) end
|
||||||
|
|
||||||
---A Multiline text edit
|
---A Multiline text edit
|
||||||
---@class TextEdit : Widget
|
---@class TextEdit : Widget
|
||||||
@@ -88,7 +88,7 @@ local textEdit = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return TextEdit
|
---@return TextEdit
|
||||||
function layout.TextEdit(children) end
|
function gui.TextEdit(children) end
|
||||||
|
|
||||||
---A PushButton
|
---A PushButton
|
||||||
---@class PushButton : Widget
|
---@class PushButton : Widget
|
||||||
@@ -96,7 +96,7 @@ local pushButton = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return PushButton
|
---@return PushButton
|
||||||
function layout.PushButton(children) end
|
function gui.PushButton(children) end
|
||||||
|
|
||||||
---A Label
|
---A Label
|
||||||
---@class Label : LayoutItem
|
---@class Label : LayoutItem
|
||||||
@@ -104,7 +104,7 @@ local label = {}
|
|||||||
|
|
||||||
---@param children LayoutItem|string|BaseAspect|function
|
---@param children LayoutItem|string|BaseAspect|function
|
||||||
---@return Label
|
---@return Label
|
||||||
function layout.Label(children) end
|
function gui.Label(children) end
|
||||||
|
|
||||||
---A SpinBox
|
---A SpinBox
|
||||||
---@class SpinBox : Widget
|
---@class SpinBox : Widget
|
||||||
@@ -112,7 +112,7 @@ local spinBox = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return SpinBox
|
---@return SpinBox
|
||||||
function layout.SpinBox(children) end
|
function gui.SpinBox(children) end
|
||||||
|
|
||||||
---A Splitter
|
---A Splitter
|
||||||
---@class Splitter : Widget
|
---@class Splitter : Widget
|
||||||
@@ -120,7 +120,7 @@ local splitter = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return Splitter
|
---@return Splitter
|
||||||
function layout.Splitter(children) end
|
function gui.Splitter(children) end
|
||||||
|
|
||||||
---A Toolbar
|
---A Toolbar
|
||||||
---@class ToolBar : Widget
|
---@class ToolBar : Widget
|
||||||
@@ -128,7 +128,7 @@ local toolBar = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return ToolBar
|
---@return ToolBar
|
||||||
function layout.ToolBar(children) end
|
function gui.ToolBar(children) end
|
||||||
|
|
||||||
---A TabWidget
|
---A TabWidget
|
||||||
---@class TabWidget : Widget
|
---@class TabWidget : Widget
|
||||||
@@ -136,46 +136,46 @@ local tabWidget = {}
|
|||||||
|
|
||||||
---@param children Layout|string|BaseAspect|function
|
---@param children Layout|string|BaseAspect|function
|
||||||
---@return TabWidget
|
---@return TabWidget
|
||||||
function layout.TabWidget(children) end
|
function gui.TabWidget(children) end
|
||||||
|
|
||||||
---@param name string
|
---@param name string
|
||||||
---@param child Layout|string|BaseAspect|function
|
---@param child Layout|string|BaseAspect|function
|
||||||
---@return TabWidget
|
---@return TabWidget
|
||||||
function layout.TabWidget(name, child) end
|
function gui.TabWidget(name, child) end
|
||||||
---A "Line break" in the layout
|
---A "Line break" in the gui
|
||||||
function layout.br() end
|
function gui.br() end
|
||||||
|
|
||||||
---A "Stretch" in the layout
|
---A "Stretch" in the layout
|
||||||
function layout.st() end
|
function gui.st() end
|
||||||
|
|
||||||
---An empty space in the layout
|
---An empty grid cell in a grid layout
|
||||||
function layout.empty() end
|
function gui.empty() end
|
||||||
|
|
||||||
---A horizontal line in the layout
|
---A horizontal line in the layout
|
||||||
function layout.hr() end
|
function gui.hr() end
|
||||||
|
|
||||||
---Clears the margin of the layout
|
---Clears the margin of the layout
|
||||||
function layout.noMargin() end
|
function gui.noMargin() end
|
||||||
|
|
||||||
---Sets the margin of the layout to the default value
|
---Sets the margin of the layout to the default value
|
||||||
function layout.normalMargin() end
|
function gui.normalMargin() end
|
||||||
|
|
||||||
---Sets the alignment of the layout to "Form"
|
---Sets the alignment of a Grid layout according to the Form layout rules
|
||||||
function layout.withFormAlignment() end
|
function gui.withFormAlignment() end
|
||||||
|
|
||||||
---Sets the size of the parent object if possible
|
---Sets the size of the parent object if possible
|
||||||
function layout.resize(width, height) end
|
function gui.resize(width, height) end
|
||||||
|
|
||||||
---Sets the spacing of the layout
|
---Sets the spacing of the gui
|
||||||
function layout.spacing(spacing) end
|
function gui.spacing(spacing) end
|
||||||
|
|
||||||
---Sets the field growth policy of the layout
|
---Sets the field growth policy of the gui
|
||||||
function layout.fieldGrowthPolicy(policy) end
|
function gui.fieldGrowthPolicy(policy) end
|
||||||
|
|
||||||
---Sets the onClicked handler of the parent object if possible
|
---Sets the onClicked handler of the parent object if possible
|
||||||
function layout.onClicked(f) end
|
function gui.onClicked(f) end
|
||||||
|
|
||||||
---Sets the onTextChanged handler of the parent object if possible
|
---Sets the onTextChanged handler of the parent object if possible
|
||||||
function layout.onTextChanged(f) end
|
function gui.onTextChanged(f) end
|
||||||
|
|
||||||
return layout
|
return gui
|
@@ -4,7 +4,7 @@ local LSP = require('LSP')
|
|||||||
local mm = require('MessageManager')
|
local mm = require('MessageManager')
|
||||||
local Utils = require('Utils')
|
local Utils = require('Utils')
|
||||||
local S = require('Settings')
|
local S = require('Settings')
|
||||||
local Layout = require('Layout')
|
local Gui = require('Gui')
|
||||||
local a = require('async')
|
local a = require('async')
|
||||||
local fetch = require('Fetch').fetch
|
local fetch = require('Fetch').fetch
|
||||||
|
|
||||||
@@ -135,8 +135,8 @@ local function using(tbl)
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
local function layoutSettings()
|
local function layoutSettings()
|
||||||
--- "using namespace Layout"
|
--- "using namespace Gui"
|
||||||
local _ENV = using(Layout)
|
local _ENV = using(Gui)
|
||||||
|
|
||||||
local installButton = {}
|
local installButton = {}
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ local mm = require('MessageManager')
|
|||||||
local Utils = require('Utils')
|
local Utils = require('Utils')
|
||||||
local Process = require('Process')
|
local Process = require('Process')
|
||||||
local S = require('Settings')
|
local S = require('Settings')
|
||||||
local Layout = require('Layout')
|
local Gui = require('Gui')
|
||||||
local a = require('async')
|
local a = require('async')
|
||||||
local fetch = require('Fetch').fetch
|
local fetch = require('Fetch').fetch
|
||||||
|
|
||||||
@@ -123,8 +123,8 @@ local function using(tbl)
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
local function layoutSettings()
|
local function layoutSettings()
|
||||||
--- "using namespace Layout"
|
--- "using namespace Gui"
|
||||||
local _ENV = using(Layout)
|
local _ENV = using(Gui)
|
||||||
|
|
||||||
local layout = Form {
|
local layout = Form {
|
||||||
Settings.binary, br,
|
Settings.binary, br,
|
||||||
|
Reference in New Issue
Block a user