From 2c44efeb2fae9e7f26011d43965ee2e271925898 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Fri, 17 Apr 2026 21:26:28 +0900 Subject: [PATCH] fix things --- .clang-format | 2 +- .gitignore | 2 + bindgen.cxx | 22 ++++---- include/MwCXX/Widget/Base.h | 12 ++-- include/MwCXX/Widget/BaseAuto.h | 88 ++++++++++++----------------- include/MwCXX/Widget/Box.h | 26 ++++----- include/MwCXX/Widget/Button.h | 26 ++++----- include/MwCXX/Widget/CheckBox.h | 10 ++-- include/MwCXX/Widget/ComboBox.h | 14 ++--- include/MwCXX/Widget/Entry.h | 14 ++--- include/MwCXX/Widget/Frame.h | 14 ++--- include/MwCXX/Widget/Image.h | 22 ++++---- include/MwCXX/Widget/Label.h | 30 +++++----- include/MwCXX/Widget/ListBox.h | 18 +++--- include/MwCXX/Widget/Menu.h | 6 +- include/MwCXX/Widget/NumberEntry.h | 10 ++-- include/MwCXX/Widget/OpenGL.h | 6 +- include/MwCXX/Widget/ProgressBar.h | 18 +++--- include/MwCXX/Widget/RadioBox.h | 10 ++-- include/MwCXX/Widget/ScrollBar.h | 30 +++++----- include/MwCXX/Widget/SubMenu.h | 10 ++-- include/MwCXX/Widget/TreeView.h | 14 ++--- include/MwCXX/Widget/Viewport.h | 6 +- include/MwCXX/Widget/Vulkan.h | 6 +- include/MwCXX/Widget/Window.h | 30 +++++----- src/widget/base.cxx | 4 +- src/widget/baseauto.cxx | 89 ++---------------------------- src/widget/box.cxx | 7 ++- src/widget/button.cxx | 7 ++- src/widget/checkbox.cxx | 7 ++- src/widget/combobox.cxx | 7 ++- src/widget/entry.cxx | 7 ++- src/widget/frame.cxx | 7 ++- src/widget/image.cxx | 7 ++- src/widget/label.cxx | 7 ++- src/widget/listbox.cxx | 7 ++- src/widget/menu.cxx | 7 ++- src/widget/numberentry.cxx | 7 ++- src/widget/opengl.cxx | 7 ++- src/widget/progressbar.cxx | 7 ++- src/widget/radiobox.cxx | 7 ++- src/widget/scrollbar.cxx | 7 ++- src/widget/submenu.cxx | 7 ++- src/widget/treeview.cxx | 7 ++- src/widget/viewport.cxx | 7 ++- src/widget/vulkan.cxx | 7 ++- src/widget/window.cxx | 7 ++- test.cxx | 28 +++++----- 48 files changed, 314 insertions(+), 393 deletions(-) diff --git a/.clang-format b/.clang-format index e168365..10cb6ac 100644 --- a/.clang-format +++ b/.clang-format @@ -5,7 +5,7 @@ AlignConsecutiveAssignments: Enabled: true AlignConsecutiveDeclarations: Enabled: true -IndentAccessModifiers: true +AccessModifierOffset: -4 NamespaceIndentation: All IndentWidth: 8 PointerAlignment: Left diff --git a/.gitignore b/.gitignore index 5589e10..d1e9e5f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /*.exe /*.so /*.dll +/a.out +*.o diff --git a/bindgen.cxx b/bindgen.cxx index b70282b..c550d49 100644 --- a/bindgen.cxx +++ b/bindgen.cxx @@ -7,16 +7,16 @@ #include struct typeinfo { - std::string type; - std::string name; - std::string struct_name; - int pointer; + std::string type; + std::string name; + std::string struct_name; + int pointer; }; struct property { - typeinfo type; - int common; - typeinfo arg_type; + typeinfo type; + int common; + typeinfo arg_type; }; std::map files; @@ -230,15 +230,15 @@ static void scan_widget(xl_node_t* node) { OFS << "namespace MwCXX {" << std::endl; OFS << " class " + name + " : public MwCXX::Base {" << std::endl; - OFS << " public:" << std::endl; - OFS << " " + name + "(MwWidget widget);" << std::endl; - OFS << " " + name + "(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);" << std::endl; + OFS << " public:" << std::endl; + OFS << " " + name + "(MwWidget widget);" << std::endl; + OFS << " " + name + "(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height);" << std::endl; if(nodes != NULL) { std::string r = ""; for(i = 0; nodes[i] != NULL; i++) { - r += scan_widget_properties_header(nodes[i], "\t\t\t"); + r += scan_widget_properties_header(nodes[i], "\t\t"); } if(r != "") OFS << std::endl diff --git a/include/MwCXX/Widget/Base.h b/include/MwCXX/Widget/Base.h index 0601b0e..d4e6093 100644 --- a/include/MwCXX/Widget/Base.h +++ b/include/MwCXX/Widget/Base.h @@ -5,14 +5,14 @@ namespace MwCXX { class Base { - protected: - MwWidget widget; + protected: + MwWidget widget; - public: - Base(MwWidget widget); - Base(MwClass widget_class, MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Base(MwWidget widget); + Base(MwClass widget_class, MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - void Loop(); + void Loop(); #include }; diff --git a/include/MwCXX/Widget/BaseAuto.h b/include/MwCXX/Widget/BaseAuto.h index a49af1d..4692a33 100644 --- a/include/MwCXX/Widget/BaseAuto.h +++ b/include/MwCXX/Widget/BaseAuto.h @@ -1,58 +1,38 @@ MwCXX::String GetBackground(); -void SetBackground(MwCXX::String value); -MwLLPixmap GetBackgroundPixmap(); -void SetBackgroundPixmap(MwLLPixmap value); -int GetBitmapFont(); -void SetBitmapFont(int value); -int GetBorderWidth(); -void SetBorderWidth(int value); - GetClipboard(); -void SetClipboard( value); - GetDarkTheme(); -void SetDarkTheme( value); -int GetFixedSize(); -void SetFixedSize(int value); - GetFocusIn(); -void SetFocusIn( value); - GetFocusOut(); -void SetFocusOut( value); -int GetForceInverted(); -void SetForceInverted(int value); +void SetBackground(MwCXX::String value); +MwLLPixmap GetBackgroundPixmap(); +void SetBackgroundPixmap(MwLLPixmap value); +int GetBitmapFont(); +void SetBitmapFont(int value); +int GetBorderWidth(); +void SetBorderWidth(int value); +int GetDarkTheme(); +void SetDarkTheme(int value); +int GetFixedSize(); +void SetFixedSize(int value); +int GetForceInverted(); +void SetForceInverted(int value); MwCXX::String GetForeground(); -void SetForeground(MwCXX::String value); -int GetHeight(); -void SetHeight(int value); -int GetIsRounded(); -void SetIsRounded(int value); - GetKey(); -void SetKey( value); - GetKeyRelease(); -void SetKeyRelease( value); -int GetModernLook(); -void SetModernLook(int value); - GetMouseDown(); -void SetMouseDown( value); - GetMouseMove(); -void SetMouseMove( value); - GetMouseUp(); -void SetMouseUp( value); -int GetRatio(); -void SetRatio(int value); - GetResize(); -void SetResize( value); +void SetForeground(MwCXX::String value); +int GetHeight(); +void SetHeight(int value); +int GetIsRounded(); +void SetIsRounded(int value); +int GetModernLook(); +void SetModernLook(int value); +int GetRatio(); +void SetRatio(int value); MwCXX::String GetSubBackground(); -void SetSubBackground(MwCXX::String value); +void SetSubBackground(MwCXX::String value); MwCXX::String GetSubForeground(); -void SetSubForeground(MwCXX::String value); - GetTick(); -void SetTick( value); -int GetUseMonospace(); -void SetUseMonospace(int value); -int GetWaitMS(); -void SetWaitMS(int value); -int GetWidth(); -void SetWidth(int value); -int GetX(); -void SetX(int value); -int GetY(); -void SetY(int value); +void SetSubForeground(MwCXX::String value); +int GetUseMonospace(); +void SetUseMonospace(int value); +int GetWaitMS(); +void SetWaitMS(int value); +int GetWidth(); +void SetWidth(int value); +int GetX(); +void SetX(int value); +int GetY(); +void SetY(int value); diff --git a/include/MwCXX/Widget/Box.h b/include/MwCXX/Widget/Box.h index 50e2964..0c6ceae 100644 --- a/include/MwCXX/Widget/Box.h +++ b/include/MwCXX/Widget/Box.h @@ -8,20 +8,20 @@ namespace MwCXX { class Box : public MwCXX::Base { - public: - Box(MwWidget widget); - Box(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Box(MwWidget widget); + Box(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetOrientation(); - void SetOrientation(int value); - int GetMargin(); - void SetMargin(int value); - int GetPadding(); - void SetPadding(int value); - int GetHasBorder(); - void SetHasBorder(int value); - int GetInverted(); - void SetInverted(int value); + int GetOrientation(); + void SetOrientation(int value); + int GetMargin(); + void SetMargin(int value); + int GetPadding(); + void SetPadding(int value); + int GetHasBorder(); + void SetHasBorder(int value); + int GetInverted(); + void SetInverted(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Button.h b/include/MwCXX/Widget/Button.h index 0856ab8..3cc49fa 100644 --- a/include/MwCXX/Widget/Button.h +++ b/include/MwCXX/Widget/Button.h @@ -8,20 +8,20 @@ namespace MwCXX { class Button : public MwCXX::Base { - public: - Button(MwWidget widget); - Button(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Button(MwWidget widget); + Button(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - MwLLPixmap GetPixmap(); - void SetPixmap(MwLLPixmap value); - MwCXX::String GetText(); - void SetText(MwCXX::String value); - int GetFlat(); - void SetFlat(int value); - int GetPadding(); - void SetPadding(int value); - int GetFillArea(); - void SetFillArea(int value); + MwLLPixmap GetPixmap(); + void SetPixmap(MwLLPixmap value); + MwCXX::String GetText(); + void SetText(MwCXX::String value); + int GetFlat(); + void SetFlat(int value); + int GetPadding(); + void SetPadding(int value); + int GetFillArea(); + void SetFillArea(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/CheckBox.h b/include/MwCXX/Widget/CheckBox.h index ad9a06a..a7e9ecb 100644 --- a/include/MwCXX/Widget/CheckBox.h +++ b/include/MwCXX/Widget/CheckBox.h @@ -8,12 +8,12 @@ namespace MwCXX { class CheckBox : public MwCXX::Base { - public: - CheckBox(MwWidget widget); - CheckBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + CheckBox(MwWidget widget); + CheckBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetChecked(); - void SetChecked(int value); + int GetChecked(); + void SetChecked(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/ComboBox.h b/include/MwCXX/Widget/ComboBox.h index f13e5bd..dd20b4e 100644 --- a/include/MwCXX/Widget/ComboBox.h +++ b/include/MwCXX/Widget/ComboBox.h @@ -8,14 +8,14 @@ namespace MwCXX { class ComboBox : public MwCXX::Base { - public: - ComboBox(MwWidget widget); - ComboBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + ComboBox(MwWidget widget); + ComboBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetAreaShown(); - void SetAreaShown(int value); - int GetValue(); - void SetValue(int value); + int GetAreaShown(); + void SetAreaShown(int value); + int GetValue(); + void SetValue(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Entry.h b/include/MwCXX/Widget/Entry.h index 553186d..5092b97 100644 --- a/include/MwCXX/Widget/Entry.h +++ b/include/MwCXX/Widget/Entry.h @@ -8,14 +8,14 @@ namespace MwCXX { class Entry : public MwCXX::Base { - public: - Entry(MwWidget widget); - Entry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Entry(MwWidget widget); + Entry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - MwCXX::String GetText(); - void SetText(MwCXX::String value); - int GetHideInput(); - void SetHideInput(int value); + MwCXX::String GetText(); + void SetText(MwCXX::String value); + int GetHideInput(); + void SetHideInput(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Frame.h b/include/MwCXX/Widget/Frame.h index 7d1223b..905a199 100644 --- a/include/MwCXX/Widget/Frame.h +++ b/include/MwCXX/Widget/Frame.h @@ -8,14 +8,14 @@ namespace MwCXX { class Frame : public MwCXX::Base { - public: - Frame(MwWidget widget); - Frame(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Frame(MwWidget widget); + Frame(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetHasBorder(); - void SetHasBorder(int value); - int GetInverted(); - void SetInverted(int value); + int GetHasBorder(); + void SetHasBorder(int value); + int GetInverted(); + void SetInverted(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Image.h b/include/MwCXX/Widget/Image.h index ab4ac50..011a57b 100644 --- a/include/MwCXX/Widget/Image.h +++ b/include/MwCXX/Widget/Image.h @@ -8,18 +8,18 @@ namespace MwCXX { class Image : public MwCXX::Base { - public: - Image(MwWidget widget); - Image(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Image(MwWidget widget); + Image(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - MwLLPixmap GetPixmap(); - void SetPixmap(MwLLPixmap value); - int GetHasBorder(); - void SetHasBorder(int value); - int GetInverted(); - void SetInverted(int value); - int GetFillArea(); - void SetFillArea(int value); + MwLLPixmap GetPixmap(); + void SetPixmap(MwLLPixmap value); + int GetHasBorder(); + void SetHasBorder(int value); + int GetInverted(); + void SetInverted(int value); + int GetFillArea(); + void SetFillArea(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Label.h b/include/MwCXX/Widget/Label.h index fdb4ce7..9a817d9 100644 --- a/include/MwCXX/Widget/Label.h +++ b/include/MwCXX/Widget/Label.h @@ -8,22 +8,22 @@ namespace MwCXX { class Label : public MwCXX::Base { - public: - Label(MwWidget widget); - Label(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Label(MwWidget widget); + Label(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - MwCXX::String GetText(); - void SetText(MwCXX::String value); - int GetAlignment(); - void SetAlignment(int value); - int GetBold(); - void SetBold(int value); - int GetSevenSegment(); - void SetSevenSegment(int value); - int GetLength(); - void SetLength(int value); - int GetLeftPadding(); - void SetLeftPadding(int value); + MwCXX::String GetText(); + void SetText(MwCXX::String value); + int GetAlignment(); + void SetAlignment(int value); + int GetBold(); + void SetBold(int value); + int GetSevenSegment(); + void SetSevenSegment(int value); + int GetLength(); + void SetLength(int value); + int GetLeftPadding(); + void SetLeftPadding(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/ListBox.h b/include/MwCXX/Widget/ListBox.h index b336a4d..de3518d 100644 --- a/include/MwCXX/Widget/ListBox.h +++ b/include/MwCXX/Widget/ListBox.h @@ -8,16 +8,16 @@ namespace MwCXX { class ListBox : public MwCXX::Base { - public: - ListBox(MwWidget widget); - ListBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + ListBox(MwWidget widget); + ListBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetLeftPadding(); - void SetLeftPadding(int value); - int GetHasHeading(); - void SetHasHeading(int value); - int GetSingleClickSelectable(); - void SetSingleClickSelectable(int value); + int GetLeftPadding(); + void SetLeftPadding(int value); + int GetHasHeading(); + void SetHasHeading(int value); + int GetSingleClickSelectable(); + void SetSingleClickSelectable(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Menu.h b/include/MwCXX/Widget/Menu.h index 2521fcd..95aef00 100644 --- a/include/MwCXX/Widget/Menu.h +++ b/include/MwCXX/Widget/Menu.h @@ -8,9 +8,9 @@ namespace MwCXX { class Menu : public MwCXX::Base { - public: - Menu(MwWidget widget); - Menu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Menu(MwWidget widget); + Menu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/NumberEntry.h b/include/MwCXX/Widget/NumberEntry.h index 02ea016..d86c6ad 100644 --- a/include/MwCXX/Widget/NumberEntry.h +++ b/include/MwCXX/Widget/NumberEntry.h @@ -8,12 +8,12 @@ namespace MwCXX { class NumberEntry : public MwCXX::Base { - public: - NumberEntry(MwWidget widget); - NumberEntry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + NumberEntry(MwWidget widget); + NumberEntry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - MwCXX::String GetText(); - void SetText(MwCXX::String value); + MwCXX::String GetText(); + void SetText(MwCXX::String value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/OpenGL.h b/include/MwCXX/Widget/OpenGL.h index 93f6cae..ec3df23 100644 --- a/include/MwCXX/Widget/OpenGL.h +++ b/include/MwCXX/Widget/OpenGL.h @@ -8,9 +8,9 @@ namespace MwCXX { class OpenGL : public MwCXX::Base { - public: - OpenGL(MwWidget widget); - OpenGL(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + OpenGL(MwWidget widget); + OpenGL(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/ProgressBar.h b/include/MwCXX/Widget/ProgressBar.h index 799fb8a..030d178 100644 --- a/include/MwCXX/Widget/ProgressBar.h +++ b/include/MwCXX/Widget/ProgressBar.h @@ -8,16 +8,16 @@ namespace MwCXX { class ProgressBar : public MwCXX::Base { - public: - ProgressBar(MwWidget widget); - ProgressBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + ProgressBar(MwWidget widget); + ProgressBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetMinValue(); - void SetMinValue(int value); - int GetMaxValue(); - void SetMaxValue(int value); - int GetValue(); - void SetValue(int value); + int GetMinValue(); + void SetMinValue(int value); + int GetMaxValue(); + void SetMaxValue(int value); + int GetValue(); + void SetValue(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/RadioBox.h b/include/MwCXX/Widget/RadioBox.h index e72fada..8a0cc27 100644 --- a/include/MwCXX/Widget/RadioBox.h +++ b/include/MwCXX/Widget/RadioBox.h @@ -8,12 +8,12 @@ namespace MwCXX { class RadioBox : public MwCXX::Base { - public: - RadioBox(MwWidget widget); - RadioBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + RadioBox(MwWidget widget); + RadioBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetChecked(); - void SetChecked(int value); + int GetChecked(); + void SetChecked(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/ScrollBar.h b/include/MwCXX/Widget/ScrollBar.h index 2ed8fee..e4973c2 100644 --- a/include/MwCXX/Widget/ScrollBar.h +++ b/include/MwCXX/Widget/ScrollBar.h @@ -8,22 +8,22 @@ namespace MwCXX { class ScrollBar : public MwCXX::Base { - public: - ScrollBar(MwWidget widget); - ScrollBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + ScrollBar(MwWidget widget); + ScrollBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetShowArrows(); - void SetShowArrows(int value); - int GetAreaShown(); - void SetAreaShown(int value); - int GetValue(); - void SetValue(int value); - int GetMinValue(); - void SetMinValue(int value); - int GetMaxValue(); - void SetMaxValue(int value); - int GetOrientation(); - void SetOrientation(int value); + int GetShowArrows(); + void SetShowArrows(int value); + int GetAreaShown(); + void SetAreaShown(int value); + int GetValue(); + void SetValue(int value); + int GetMinValue(); + void SetMinValue(int value); + int GetMaxValue(); + void SetMaxValue(int value); + int GetOrientation(); + void SetOrientation(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/SubMenu.h b/include/MwCXX/Widget/SubMenu.h index 88e4a29..9d45b4d 100644 --- a/include/MwCXX/Widget/SubMenu.h +++ b/include/MwCXX/Widget/SubMenu.h @@ -8,12 +8,12 @@ namespace MwCXX { class SubMenu : public MwCXX::Base { - public: - SubMenu(MwWidget widget); - SubMenu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + SubMenu(MwWidget widget); + SubMenu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetLeftPadding(); - void SetLeftPadding(int value); + int GetLeftPadding(); + void SetLeftPadding(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/TreeView.h b/include/MwCXX/Widget/TreeView.h index b63b2e3..b77048e 100644 --- a/include/MwCXX/Widget/TreeView.h +++ b/include/MwCXX/Widget/TreeView.h @@ -8,14 +8,14 @@ namespace MwCXX { class TreeView : public MwCXX::Base { - public: - TreeView(MwWidget widget); - TreeView(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + TreeView(MwWidget widget); + TreeView(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - int GetLeftPadding(); - void SetLeftPadding(int value); - int GetSingleClickSelectable(); - void SetSingleClickSelectable(int value); + int GetLeftPadding(); + void SetLeftPadding(int value); + int GetSingleClickSelectable(); + void SetSingleClickSelectable(int value); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Viewport.h b/include/MwCXX/Widget/Viewport.h index 64242dd..b8b9898 100644 --- a/include/MwCXX/Widget/Viewport.h +++ b/include/MwCXX/Widget/Viewport.h @@ -8,9 +8,9 @@ namespace MwCXX { class Viewport : public MwCXX::Base { - public: - Viewport(MwWidget widget); - Viewport(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Viewport(MwWidget widget); + Viewport(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Vulkan.h b/include/MwCXX/Widget/Vulkan.h index 00f761b..cc4ee4e 100644 --- a/include/MwCXX/Widget/Vulkan.h +++ b/include/MwCXX/Widget/Vulkan.h @@ -8,9 +8,9 @@ namespace MwCXX { class Vulkan : public MwCXX::Base { - public: - Vulkan(MwWidget widget); - Vulkan(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Vulkan(MwWidget widget); + Vulkan(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); }; }; // namespace MwCXX diff --git a/include/MwCXX/Widget/Window.h b/include/MwCXX/Widget/Window.h index af48bc7..a87d830 100644 --- a/include/MwCXX/Widget/Window.h +++ b/include/MwCXX/Widget/Window.h @@ -8,22 +8,22 @@ namespace MwCXX { class Window : public MwCXX::Base { - public: - Window(MwWidget widget); - Window(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); + public: + Window(MwWidget widget); + Window(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height); - MwCXX::String GetTitle(); - void SetTitle(MwCXX::String value); - int GetMain(); - void SetMain(int value); - MwLLPixmap GetIconPixmap(); - void SetIconPixmap(MwLLPixmap value); - MwSizeHints* GetSizeHints(); - void SetSizeHints(MwSizeHints* value); - int GetHasBorder(); - void SetHasBorder(int value); - int GetInverted(); - void SetInverted(int value); + MwCXX::String GetTitle(); + void SetTitle(MwCXX::String value); + int GetMain(); + void SetMain(int value); + MwLLPixmap GetIconPixmap(); + void SetIconPixmap(MwLLPixmap value); + MwSizeHints* GetSizeHints(); + void SetSizeHints(MwSizeHints* value); + int GetHasBorder(); + void SetHasBorder(int value); + int GetInverted(); + void SetInverted(int value); }; }; // namespace MwCXX diff --git a/src/widget/base.cxx b/src/widget/base.cxx index d1e226e..f82c8a7 100644 --- a/src/widget/base.cxx +++ b/src/widget/base.cxx @@ -1,10 +1,10 @@ #include -MwCXX::Base::Base(MwWidget widget){ +MwCXX::Base::Base(MwWidget widget) { this->widget = widget; } -MwCXX::Base::Base(MwClass widget_class, MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height){ +MwCXX::Base::Base(MwClass widget_class, MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) { #ifdef MWCXX_USE_C_STRING this->widget = MwCreateWidget(widget_class, name, parent == NULL ? NULL : parent->widget, x, y, width, height); #else diff --git a/src/widget/baseauto.cxx b/src/widget/baseauto.cxx index 0ab0aa2..f941e43 100644 --- a/src/widget/baseauto.cxx +++ b/src/widget/baseauto.cxx @@ -36,20 +36,12 @@ void MwCXX::Base::SetBorderWidth(int value) { MwSetInteger(this->widget, MwNborderWidth, (int)value); } - MwCXX::Base::GetClipboard() { - return ()MwGetVoid(this->widget, MwNclipboard); +int MwCXX::Base::GetDarkTheme() { + return (int)MwGetInteger(this->widget, MwNdarkTheme); } -void MwCXX::Base::SetClipboard( value) { - MwSetVoid(this->widget, MwNclipboard, ()value); -} - - MwCXX::Base::GetDarkTheme() { - return ()MwGetVoid(this->widget, MwNdarkTheme); -} - -void MwCXX::Base::SetDarkTheme( value) { - MwSetVoid(this->widget, MwNdarkTheme, ()value); +void MwCXX::Base::SetDarkTheme(int value) { + MwSetInteger(this->widget, MwNdarkTheme, (int)value); } int MwCXX::Base::GetFixedSize() { @@ -60,22 +52,6 @@ void MwCXX::Base::SetFixedSize(int value) { MwSetInteger(this->widget, MwNfixedSize, (int)value); } - MwCXX::Base::GetFocusIn() { - return ()MwGetVoid(this->widget, MwNfocusIn); -} - -void MwCXX::Base::SetFocusIn( value) { - MwSetVoid(this->widget, MwNfocusIn, ()value); -} - - MwCXX::Base::GetFocusOut() { - return ()MwGetVoid(this->widget, MwNfocusOut); -} - -void MwCXX::Base::SetFocusOut( value) { - MwSetVoid(this->widget, MwNfocusOut, ()value); -} - int MwCXX::Base::GetForceInverted() { return (int)MwGetInteger(this->widget, MwNforceInverted); } @@ -112,22 +88,6 @@ void MwCXX::Base::SetIsRounded(int value) { MwSetInteger(this->widget, MwNisRounded, (int)value); } - MwCXX::Base::GetKey() { - return ()MwGetVoid(this->widget, MwNkey); -} - -void MwCXX::Base::SetKey( value) { - MwSetVoid(this->widget, MwNkey, ()value); -} - - MwCXX::Base::GetKeyRelease() { - return ()MwGetVoid(this->widget, MwNkeyRelease); -} - -void MwCXX::Base::SetKeyRelease( value) { - MwSetVoid(this->widget, MwNkeyRelease, ()value); -} - int MwCXX::Base::GetModernLook() { return (int)MwGetInteger(this->widget, MwNmodernLook); } @@ -136,30 +96,6 @@ void MwCXX::Base::SetModernLook(int value) { MwSetInteger(this->widget, MwNmodernLook, (int)value); } - MwCXX::Base::GetMouseDown() { - return ()MwGetVoid(this->widget, MwNmouseDown); -} - -void MwCXX::Base::SetMouseDown( value) { - MwSetVoid(this->widget, MwNmouseDown, ()value); -} - - MwCXX::Base::GetMouseMove() { - return ()MwGetVoid(this->widget, MwNmouseMove); -} - -void MwCXX::Base::SetMouseMove( value) { - MwSetVoid(this->widget, MwNmouseMove, ()value); -} - - MwCXX::Base::GetMouseUp() { - return ()MwGetVoid(this->widget, MwNmouseUp); -} - -void MwCXX::Base::SetMouseUp( value) { - MwSetVoid(this->widget, MwNmouseUp, ()value); -} - int MwCXX::Base::GetRatio() { return (int)MwGetInteger(this->widget, MwNratio); } @@ -168,14 +104,6 @@ void MwCXX::Base::SetRatio(int value) { MwSetInteger(this->widget, MwNratio, (int)value); } - MwCXX::Base::GetResize() { - return ()MwGetVoid(this->widget, MwNresize); -} - -void MwCXX::Base::SetResize( value) { - MwSetVoid(this->widget, MwNresize, ()value); -} - MwCXX::String MwCXX::Base::GetSubBackground() { return (MwCXX::String)MwGetText(this->widget, MwNsubBackground); } @@ -200,14 +128,6 @@ void MwCXX::Base::SetSubForeground(MwCXX::String value) { #endif } - MwCXX::Base::GetTick() { - return ()MwGetVoid(this->widget, MwNtick); -} - -void MwCXX::Base::SetTick( value) { - MwSetVoid(this->widget, MwNtick, ()value); -} - int MwCXX::Base::GetUseMonospace() { return (int)MwGetInteger(this->widget, MwNuseMonospace); } @@ -247,4 +167,3 @@ int MwCXX::Base::GetY() { void MwCXX::Base::SetY(int value) { MwSetInteger(this->widget, MwNy, (int)value); } - diff --git a/src/widget/box.cxx b/src/widget/box.cxx index 65a0005..5255e71 100644 --- a/src/widget/box.cxx +++ b/src/widget/box.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Box::Box(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Box::Box(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Box::Box(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwBoxClass, name, parent, x, y, width, height) { +MwCXX::Box::Box(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwBoxClass, name, parent, x, y, width, height) { } int MwCXX::Box::GetOrientation() { @@ -45,4 +47,3 @@ int MwCXX::Box::GetInverted() { void MwCXX::Box::SetInverted(int value) { MwSetInteger(this->widget, MwNinverted, (int)value); } - diff --git a/src/widget/button.cxx b/src/widget/button.cxx index fd4e07c..31ab03a 100644 --- a/src/widget/button.cxx +++ b/src/widget/button.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Button::Button(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Button::Button(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Button::Button(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwButtonClass, name, parent, x, y, width, height) { +MwCXX::Button::Button(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwButtonClass, name, parent, x, y, width, height) { } MwLLPixmap MwCXX::Button::GetPixmap() { @@ -49,4 +51,3 @@ int MwCXX::Button::GetFillArea() { void MwCXX::Button::SetFillArea(int value) { MwSetInteger(this->widget, MwNfillArea, (int)value); } - diff --git a/src/widget/checkbox.cxx b/src/widget/checkbox.cxx index 60a777f..8c7e4bb 100644 --- a/src/widget/checkbox.cxx +++ b/src/widget/checkbox.cxx @@ -1,9 +1,11 @@ #include -MwCXX::CheckBox::CheckBox(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::CheckBox::CheckBox(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::CheckBox::CheckBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwCheckBoxClass, name, parent, x, y, width, height) { +MwCXX::CheckBox::CheckBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwCheckBoxClass, name, parent, x, y, width, height) { } int MwCXX::CheckBox::GetChecked() { @@ -13,4 +15,3 @@ int MwCXX::CheckBox::GetChecked() { void MwCXX::CheckBox::SetChecked(int value) { MwSetInteger(this->widget, MwNchecked, (int)value); } - diff --git a/src/widget/combobox.cxx b/src/widget/combobox.cxx index a4efb78..17e31ea 100644 --- a/src/widget/combobox.cxx +++ b/src/widget/combobox.cxx @@ -1,9 +1,11 @@ #include -MwCXX::ComboBox::ComboBox(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::ComboBox::ComboBox(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::ComboBox::ComboBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwComboBoxClass, name, parent, x, y, width, height) { +MwCXX::ComboBox::ComboBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwComboBoxClass, name, parent, x, y, width, height) { } int MwCXX::ComboBox::GetAreaShown() { @@ -21,4 +23,3 @@ int MwCXX::ComboBox::GetValue() { void MwCXX::ComboBox::SetValue(int value) { MwSetInteger(this->widget, MwNvalue, (int)value); } - diff --git a/src/widget/entry.cxx b/src/widget/entry.cxx index 18fe8a3..2809291 100644 --- a/src/widget/entry.cxx +++ b/src/widget/entry.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Entry::Entry(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Entry::Entry(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Entry::Entry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwEntryClass, name, parent, x, y, width, height) { +MwCXX::Entry::Entry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwEntryClass, name, parent, x, y, width, height) { } MwCXX::String MwCXX::Entry::GetText() { @@ -25,4 +27,3 @@ int MwCXX::Entry::GetHideInput() { void MwCXX::Entry::SetHideInput(int value) { MwSetInteger(this->widget, MwNhideInput, (int)value); } - diff --git a/src/widget/frame.cxx b/src/widget/frame.cxx index 8470ae0..4acc16a 100644 --- a/src/widget/frame.cxx +++ b/src/widget/frame.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Frame::Frame(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Frame::Frame(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Frame::Frame(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwFrameClass, name, parent, x, y, width, height) { +MwCXX::Frame::Frame(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwFrameClass, name, parent, x, y, width, height) { } int MwCXX::Frame::GetHasBorder() { @@ -21,4 +23,3 @@ int MwCXX::Frame::GetInverted() { void MwCXX::Frame::SetInverted(int value) { MwSetInteger(this->widget, MwNinverted, (int)value); } - diff --git a/src/widget/image.cxx b/src/widget/image.cxx index ed0cebd..31a268c 100644 --- a/src/widget/image.cxx +++ b/src/widget/image.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Image::Image(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Image::Image(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Image::Image(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwImageClass, name, parent, x, y, width, height) { +MwCXX::Image::Image(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwImageClass, name, parent, x, y, width, height) { } MwLLPixmap MwCXX::Image::GetPixmap() { @@ -37,4 +39,3 @@ int MwCXX::Image::GetFillArea() { void MwCXX::Image::SetFillArea(int value) { MwSetInteger(this->widget, MwNfillArea, (int)value); } - diff --git a/src/widget/label.cxx b/src/widget/label.cxx index c9ad9c7..eb31523 100644 --- a/src/widget/label.cxx +++ b/src/widget/label.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Label::Label(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Label::Label(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Label::Label(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwLabelClass, name, parent, x, y, width, height) { +MwCXX::Label::Label(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwLabelClass, name, parent, x, y, width, height) { } MwCXX::String MwCXX::Label::GetText() { @@ -57,4 +59,3 @@ int MwCXX::Label::GetLeftPadding() { void MwCXX::Label::SetLeftPadding(int value) { MwSetInteger(this->widget, MwNleftPadding, (int)value); } - diff --git a/src/widget/listbox.cxx b/src/widget/listbox.cxx index a539f12..22cfb24 100644 --- a/src/widget/listbox.cxx +++ b/src/widget/listbox.cxx @@ -1,9 +1,11 @@ #include -MwCXX::ListBox::ListBox(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::ListBox::ListBox(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::ListBox::ListBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwListBoxClass, name, parent, x, y, width, height) { +MwCXX::ListBox::ListBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwListBoxClass, name, parent, x, y, width, height) { } int MwCXX::ListBox::GetLeftPadding() { @@ -29,4 +31,3 @@ int MwCXX::ListBox::GetSingleClickSelectable() { void MwCXX::ListBox::SetSingleClickSelectable(int value) { MwSetInteger(this->widget, MwNsingleClickSelectable, (int)value); } - diff --git a/src/widget/menu.cxx b/src/widget/menu.cxx index 753d70f..ff467a1 100644 --- a/src/widget/menu.cxx +++ b/src/widget/menu.cxx @@ -1,8 +1,9 @@ #include -MwCXX::Menu::Menu(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Menu::Menu(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Menu::Menu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwMenuClass, name, parent, x, y, width, height) { +MwCXX::Menu::Menu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwMenuClass, name, parent, x, y, width, height) { } - diff --git a/src/widget/numberentry.cxx b/src/widget/numberentry.cxx index fc50c4d..9dc844b 100644 --- a/src/widget/numberentry.cxx +++ b/src/widget/numberentry.cxx @@ -1,9 +1,11 @@ #include -MwCXX::NumberEntry::NumberEntry(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::NumberEntry::NumberEntry(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::NumberEntry::NumberEntry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwNumberEntryClass, name, parent, x, y, width, height) { +MwCXX::NumberEntry::NumberEntry(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwNumberEntryClass, name, parent, x, y, width, height) { } MwCXX::String MwCXX::NumberEntry::GetText() { @@ -17,4 +19,3 @@ void MwCXX::NumberEntry::SetText(MwCXX::String value) { MwSetText(this->widget, MwNtext, (MwCXX::String)value); #endif } - diff --git a/src/widget/opengl.cxx b/src/widget/opengl.cxx index 3f5bf6e..f756d71 100644 --- a/src/widget/opengl.cxx +++ b/src/widget/opengl.cxx @@ -1,9 +1,10 @@ #define MW_OPENGL_NO_INCLUDE #include -MwCXX::OpenGL::OpenGL(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::OpenGL::OpenGL(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::OpenGL::OpenGL(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwOpenGLClass, name, parent, x, y, width, height) { +MwCXX::OpenGL::OpenGL(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwOpenGLClass, name, parent, x, y, width, height) { } - diff --git a/src/widget/progressbar.cxx b/src/widget/progressbar.cxx index 42f9cd8..f7596af 100644 --- a/src/widget/progressbar.cxx +++ b/src/widget/progressbar.cxx @@ -1,9 +1,11 @@ #include -MwCXX::ProgressBar::ProgressBar(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::ProgressBar::ProgressBar(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::ProgressBar::ProgressBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwProgressBarClass, name, parent, x, y, width, height) { +MwCXX::ProgressBar::ProgressBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwProgressBarClass, name, parent, x, y, width, height) { } int MwCXX::ProgressBar::GetMinValue() { @@ -29,4 +31,3 @@ int MwCXX::ProgressBar::GetValue() { void MwCXX::ProgressBar::SetValue(int value) { MwSetInteger(this->widget, MwNvalue, (int)value); } - diff --git a/src/widget/radiobox.cxx b/src/widget/radiobox.cxx index e43b15b..f531bab 100644 --- a/src/widget/radiobox.cxx +++ b/src/widget/radiobox.cxx @@ -1,9 +1,11 @@ #include -MwCXX::RadioBox::RadioBox(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::RadioBox::RadioBox(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::RadioBox::RadioBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwRadioBoxClass, name, parent, x, y, width, height) { +MwCXX::RadioBox::RadioBox(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwRadioBoxClass, name, parent, x, y, width, height) { } int MwCXX::RadioBox::GetChecked() { @@ -13,4 +15,3 @@ int MwCXX::RadioBox::GetChecked() { void MwCXX::RadioBox::SetChecked(int value) { MwSetInteger(this->widget, MwNchecked, (int)value); } - diff --git a/src/widget/scrollbar.cxx b/src/widget/scrollbar.cxx index 969f471..a3d0da5 100644 --- a/src/widget/scrollbar.cxx +++ b/src/widget/scrollbar.cxx @@ -1,9 +1,11 @@ #include -MwCXX::ScrollBar::ScrollBar(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::ScrollBar::ScrollBar(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::ScrollBar::ScrollBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwScrollBarClass, name, parent, x, y, width, height) { +MwCXX::ScrollBar::ScrollBar(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwScrollBarClass, name, parent, x, y, width, height) { } int MwCXX::ScrollBar::GetShowArrows() { @@ -53,4 +55,3 @@ int MwCXX::ScrollBar::GetOrientation() { void MwCXX::ScrollBar::SetOrientation(int value) { MwSetInteger(this->widget, MwNorientation, (int)value); } - diff --git a/src/widget/submenu.cxx b/src/widget/submenu.cxx index 8421485..401845e 100644 --- a/src/widget/submenu.cxx +++ b/src/widget/submenu.cxx @@ -1,9 +1,11 @@ #include -MwCXX::SubMenu::SubMenu(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::SubMenu::SubMenu(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::SubMenu::SubMenu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwSubMenuClass, name, parent, x, y, width, height) { +MwCXX::SubMenu::SubMenu(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwSubMenuClass, name, parent, x, y, width, height) { } int MwCXX::SubMenu::GetLeftPadding() { @@ -13,4 +15,3 @@ int MwCXX::SubMenu::GetLeftPadding() { void MwCXX::SubMenu::SetLeftPadding(int value) { MwSetInteger(this->widget, MwNleftPadding, (int)value); } - diff --git a/src/widget/treeview.cxx b/src/widget/treeview.cxx index 9c0544c..bb9a442 100644 --- a/src/widget/treeview.cxx +++ b/src/widget/treeview.cxx @@ -1,9 +1,11 @@ #include -MwCXX::TreeView::TreeView(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::TreeView::TreeView(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::TreeView::TreeView(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwTreeViewClass, name, parent, x, y, width, height) { +MwCXX::TreeView::TreeView(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwTreeViewClass, name, parent, x, y, width, height) { } int MwCXX::TreeView::GetLeftPadding() { @@ -21,4 +23,3 @@ int MwCXX::TreeView::GetSingleClickSelectable() { void MwCXX::TreeView::SetSingleClickSelectable(int value) { MwSetInteger(this->widget, MwNsingleClickSelectable, (int)value); } - diff --git a/src/widget/viewport.cxx b/src/widget/viewport.cxx index 1de408f..0d58569 100644 --- a/src/widget/viewport.cxx +++ b/src/widget/viewport.cxx @@ -1,8 +1,9 @@ #include -MwCXX::Viewport::Viewport(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Viewport::Viewport(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Viewport::Viewport(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwViewportClass, name, parent, x, y, width, height) { +MwCXX::Viewport::Viewport(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwViewportClass, name, parent, x, y, width, height) { } - diff --git a/src/widget/vulkan.cxx b/src/widget/vulkan.cxx index 25bfbc2..e91c40f 100644 --- a/src/widget/vulkan.cxx +++ b/src/widget/vulkan.cxx @@ -1,9 +1,10 @@ #define MW_VULKAN_NO_INCLUDE #include -MwCXX::Vulkan::Vulkan(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Vulkan::Vulkan(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Vulkan::Vulkan(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwVulkanClass, name, parent, x, y, width, height) { +MwCXX::Vulkan::Vulkan(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwVulkanClass, name, parent, x, y, width, height) { } - diff --git a/src/widget/window.cxx b/src/widget/window.cxx index 9134094..6789562 100644 --- a/src/widget/window.cxx +++ b/src/widget/window.cxx @@ -1,9 +1,11 @@ #include -MwCXX::Window::Window(MwWidget widget) : MwCXX::Base(widget) { +MwCXX::Window::Window(MwWidget widget) + : MwCXX::Base(widget) { } -MwCXX::Window::Window(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) : MwCXX::Base(MwWindowClass, name, parent, x, y, width, height) { +MwCXX::Window::Window(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height) + : MwCXX::Base(MwWindowClass, name, parent, x, y, width, height) { } MwCXX::String MwCXX::Window::GetTitle() { @@ -57,4 +59,3 @@ int MwCXX::Window::GetInverted() { void MwCXX::Window::SetInverted(int value) { MwSetInteger(this->widget, MwNinverted, (int)value); } - diff --git a/test.cxx b/test.cxx index 255ca0a..fa91f1d 100644 --- a/test.cxx +++ b/test.cxx @@ -5,25 +5,25 @@ #include class MyButton : public MwCXX::Button { - protected: - void OnActivate() { - std::cout << "Hello" << std::endl; - } + protected: + void OnActivate() { + std::cout << "Hello" << std::endl; + } - public: - MWCXX_CONSTRUCTOR(MyButton, MwCXX::Button) { - this->SetText("Hello, world!"); - } + public: + MWCXX_CONSTRUCTOR(MyButton, MwCXX::Button) { + this->SetText("Hello, world!"); + } }; class MyWindow : public MwCXX::Window { - private: - MyButton* epic; + private: + MyButton* epic; - public: - MWCXX_CONSTRUCTOR(MyWindow, MwCXX::Window) { - this->epic = new MyButton("epic app", this, 10, 10, 640 - 10 * 2, 480 - 10 * 2); - } + public: + MWCXX_CONSTRUCTOR(MyWindow, MwCXX::Window) { + this->epic = new MyButton("epic app", this, 10, 10, 640 - 10 * 2, 480 - 10 * 2); + } }; int main() {