diff --git a/GNUmakefile b/GNUmakefile index 99fd45a..4ff4a95 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -29,7 +29,7 @@ L_LIBS = $(LIBS) L_OBJS = src/core.o src/default.o src/draw.o src/lowlevel.o src/font.o src/boldfont.o src/error.o L_OBJS += src/external/ds.o src/external/image.o L_OBJS += src/widget/window.o src/widget/button.o src/widget/frame.o src/widget/menu.o src/widget/submenu.o src/widget/image.o src/widget/scrollbar.o src/widget/checkbox.o src/widget/label.o src/widget/text.o -L_OBJS += src/cursor/default.o src/cursor/cross.o +L_OBJS += src/cursor/default.o src/cursor/cross.o src/cursor/text.o OOL_CXXFLAGS = $(DEPINC) $(CFLAGS) -std=c++98 -fPIC OOL_LDFLAGS = $(LDFLAGS) -L src diff --git a/NTMakefile b/NTMakefile index 7307569..70343ca 100644 --- a/NTMakefile +++ b/NTMakefile @@ -2,7 +2,7 @@ CC = cl LD = link -OBJS = src\core.obj src\draw.obj src\default.obj src\lowlevel.obj src\error.obj src\font.obj src\boldfont.obj src\widget\button.obj src\widget\frame.obj src\widget\opengl.obj src\widget\window.obj src\widget\menu.obj src\widget\submenu.obj src\widget\image.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\label.obj src\widget\text.obj src\external\ds.obj src\external\image.obj src\cursor\default.obj src\cursor\cross.obj src\backend\gdi.obj +OBJS = src\core.obj src\draw.obj src\default.obj src\lowlevel.obj src\error.obj src\font.obj src\boldfont.obj src\widget\button.obj src\widget\frame.obj src\widget\opengl.obj src\widget\window.obj src\widget\menu.obj src\widget\submenu.obj src\widget\image.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\label.obj src\widget\text.obj src\external\ds.obj src\external\image.obj src\cursor\default.obj src\cursor\cross.obj src\cursor\text.obj src\backend\gdi.obj OOOBJS = oosrc\base.obj oosrc\widget\button.obj oosrc\widget\frame.obj oosrc\widget\image.obj oosrc\widget\menu.obj oosrc\widget\opengl.obj oosrc\widget\scrollbar.obj oosrc\widget\submenu.obj oosrc\widget\window.obj oosrc\widget\checkbox.obj oosrc\widget\text.obj oosrc\widget\label.obj CFLAGS = /nologo /DSTBI_NO_SIMD /D_MILSKO /DUSE_GDI /DUSE_STB_IMAGE /Iinclude CXXFLAGS = /nologo /Iinclude diff --git a/include/Mw/Cursor.h b/include/Mw/Cursor.h index 9cbe6fa..aec4e24 100644 --- a/include/Mw/Cursor.h +++ b/include/Mw/Cursor.h @@ -34,6 +34,16 @@ MWDECL MwCursor MwCursorCross; */ MWDECL MwCursor MwCursorCrossMask; +/*! + * %brief Text cursor + */ +MWDECL MwCursor MwCursorText; + +/*! + * %brief Text cursor mask + */ +MWDECL MwCursor MwCursorTextMask; + #ifdef __cplusplus } #endif diff --git a/include/MwOO/Widget/Button.h b/include/MwOO/Widget/Button.h index 44c5131..4d582ef 100644 --- a/include/MwOO/Widget/Button.h +++ b/include/MwOO/Widget/Button.h @@ -12,6 +12,10 @@ class Button : public MwOO::Base { void* GetPixmap(void); void SetText(const char* value); const char* GetText(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/CheckBox.h b/include/MwOO/Widget/CheckBox.h index ed922ff..46d3827 100644 --- a/include/MwOO/Widget/CheckBox.h +++ b/include/MwOO/Widget/CheckBox.h @@ -8,8 +8,12 @@ namespace MwOO { class CheckBox : public MwOO::Base { public: CheckBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - void SetChecked(int value); - int GetChecked(void); + void SetChecked(int value); + int GetChecked(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Frame.h b/include/MwOO/Widget/Frame.h index f5d7057..4dea3ab 100644 --- a/include/MwOO/Widget/Frame.h +++ b/include/MwOO/Widget/Frame.h @@ -8,6 +8,10 @@ namespace MwOO { class Frame : public MwOO::Base { public: Frame(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Image.h b/include/MwOO/Widget/Image.h index 3864020..ccfa28a 100644 --- a/include/MwOO/Widget/Image.h +++ b/include/MwOO/Widget/Image.h @@ -8,8 +8,12 @@ namespace MwOO { class Image : public MwOO::Base { public: Image(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - void SetPixmap(void* value); - void* GetPixmap(void); + void SetPixmap(void* value); + void* GetPixmap(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Label.h b/include/MwOO/Widget/Label.h index 8098b2e..96c93bd 100644 --- a/include/MwOO/Widget/Label.h +++ b/include/MwOO/Widget/Label.h @@ -12,6 +12,10 @@ class Label : public MwOO::Base { const char* GetText(void); void SetAlignment(int value); int GetAlignment(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Menu.h b/include/MwOO/Widget/Menu.h index 5d9d4a1..003e480 100644 --- a/include/MwOO/Widget/Menu.h +++ b/include/MwOO/Widget/Menu.h @@ -8,7 +8,11 @@ namespace MwOO { class Menu : public MwOO::Base { public: Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - MwMenu Add(MwMenu menu, const char* name); + MwMenu Add(MwMenu menu, const char* name); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/OpenGL.h b/include/MwOO/Widget/OpenGL.h index e2276ae..72b3009 100644 --- a/include/MwOO/Widget/OpenGL.h +++ b/include/MwOO/Widget/OpenGL.h @@ -8,9 +8,13 @@ namespace MwOO { class OpenGL : public MwOO::Base { public: OpenGL(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - void MakeCurrent(void); - void* GetProcAddress(const char* name); - void SwapBuffer(void); + void MakeCurrent(void); + void* GetProcAddress(const char* name); + void SwapBuffer(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/ScrollBar.h b/include/MwOO/Widget/ScrollBar.h index a361a81..da210d8 100644 --- a/include/MwOO/Widget/ScrollBar.h +++ b/include/MwOO/Widget/ScrollBar.h @@ -8,17 +8,21 @@ namespace MwOO { class ScrollBar : public MwOO::Base { public: ScrollBar(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - int GetVisibleLength(void); - void SetAreaShown(int value); - int GetAreaShown(void); - void SetValue(int value); - int GetValue(void); - void SetMinValue(int value); - int GetMinValue(void); - void SetMaxValue(int value); - int GetMaxValue(void); - void SetOrientation(int value); - int GetOrientation(void); + int GetVisibleLength(void); + void SetAreaShown(int value); + int GetAreaShown(void); + void SetValue(int value); + int GetValue(void); + void SetMinValue(int value); + int GetMinValue(void); + void SetMaxValue(int value); + int GetMaxValue(void); + void SetOrientation(int value); + int GetOrientation(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/SubMenu.h b/include/MwOO/Widget/SubMenu.h index 38c24c9..431f9f4 100644 --- a/include/MwOO/Widget/SubMenu.h +++ b/include/MwOO/Widget/SubMenu.h @@ -8,7 +8,11 @@ namespace MwOO { class SubMenu : public MwOO::Base { public: SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - void Appear(MwMenu menu, MwPoint* point); + void Appear(MwMenu menu, MwPoint* point); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Text.h b/include/MwOO/Widget/Text.h index a7f796b..683dbe5 100644 --- a/include/MwOO/Widget/Text.h +++ b/include/MwOO/Widget/Text.h @@ -8,8 +8,12 @@ namespace MwOO { class Text : public MwOO::Base { public: Text(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - void SetChecked(int value); - int GetChecked(void); + void SetChecked(int value); + int GetChecked(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Vulkan.h b/include/MwOO/Widget/Vulkan.h index ff74da2..8d3940e 100644 --- a/include/MwOO/Widget/Vulkan.h +++ b/include/MwOO/Widget/Vulkan.h @@ -8,11 +8,15 @@ namespace MwOO { class Vulkan : public MwOO::Base { public: Vulkan(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); - void EnableExtension(void); - void EnableLayer(void); - void Configure(void); - void* GetField(MwVulkanField field, MwErrorEnum* out); - VkBool32 Supported(void); + void EnableExtension(void); + void EnableLayer(void); + void Configure(void); + void* GetField(MwVulkanField field, MwErrorEnum* out); + VkBool32 Supported(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/include/MwOO/Widget/Window.h b/include/MwOO/Widget/Window.h index 53fe888..1f17f34 100644 --- a/include/MwOO/Widget/Window.h +++ b/include/MwOO/Widget/Window.h @@ -10,6 +10,10 @@ class Window : public MwOO::Base { Window(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); void SetTitle(const char* value); const char* GetTitle(void); + void SetBackground(const char* value); + const char* GetBackground(void); + void SetForeground(const char* value); + const char* GetForeground(void); }; } // namespace MwOO diff --git a/oosrc/widget/button.cc b/oosrc/widget/button.cc index d70a37a..391b430 100644 --- a/oosrc/widget/button.cc +++ b/oosrc/widget/button.cc @@ -21,3 +21,19 @@ const char* MwOO::Button::GetText(void){ return MwGetText(this->widget, MwNtext); } +void MwOO::Button::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Button::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Button::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Button::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/checkbox.cc b/oosrc/widget/checkbox.cc index bb066c6..e63165f 100644 --- a/oosrc/widget/checkbox.cc +++ b/oosrc/widget/checkbox.cc @@ -13,3 +13,19 @@ int MwOO::CheckBox::GetChecked(void){ return MwGetInteger(this->widget, MwNchecked); } +void MwOO::CheckBox::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::CheckBox::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::CheckBox::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::CheckBox::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/frame.cc b/oosrc/widget/frame.cc index 4ac9a5e..2e3dedd 100644 --- a/oosrc/widget/frame.cc +++ b/oosrc/widget/frame.cc @@ -5,3 +5,19 @@ MwOO::Frame::Frame(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h) : MwOO::Base(MwFrameClass, widget_name, parent, x, y, w, h){ } +void MwOO::Frame::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Frame::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Frame::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Frame::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/image.cc b/oosrc/widget/image.cc index 5e5de93..977a371 100644 --- a/oosrc/widget/image.cc +++ b/oosrc/widget/image.cc @@ -13,3 +13,19 @@ void* MwOO::Image::GetPixmap(void){ return MwGetVoid(this->widget, MwNpixmap); } +void MwOO::Image::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Image::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Image::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Image::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/label.cc b/oosrc/widget/label.cc index 2c425e2..21b8618 100644 --- a/oosrc/widget/label.cc +++ b/oosrc/widget/label.cc @@ -21,3 +21,19 @@ int MwOO::Label::GetAlignment(void){ return MwGetInteger(this->widget, MwNalignment); } +void MwOO::Label::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Label::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Label::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Label::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/menu.cc b/oosrc/widget/menu.cc index eff6547..b6aa490 100644 --- a/oosrc/widget/menu.cc +++ b/oosrc/widget/menu.cc @@ -8,3 +8,19 @@ MwOO::Menu::Menu(const char* widget_name, MwOO::Base* parent, int x, int y, int MwMenu MwOO::Menu::Add(MwMenu menu, const char* name){ return MwMenuAdd(this->widget, menu, name); } +void MwOO::Menu::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Menu::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Menu::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Menu::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/opengl.cc b/oosrc/widget/opengl.cc index 5d6fb0b..78c6cc2 100644 --- a/oosrc/widget/opengl.cc +++ b/oosrc/widget/opengl.cc @@ -14,3 +14,19 @@ void* MwOO::OpenGL::GetProcAddress(const char* name){ void MwOO::OpenGL::SwapBuffer(void){ MwOpenGLSwapBuffer(this->widget); } +void MwOO::OpenGL::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::OpenGL::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::OpenGL::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::OpenGL::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/scrollbar.cc b/oosrc/widget/scrollbar.cc index eed2b61..6f65f87 100644 --- a/oosrc/widget/scrollbar.cc +++ b/oosrc/widget/scrollbar.cc @@ -48,3 +48,19 @@ int MwOO::ScrollBar::GetOrientation(void){ return MwGetInteger(this->widget, MwNorientation); } +void MwOO::ScrollBar::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::ScrollBar::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::ScrollBar::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::ScrollBar::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/submenu.cc b/oosrc/widget/submenu.cc index 8442175..02c56f7 100644 --- a/oosrc/widget/submenu.cc +++ b/oosrc/widget/submenu.cc @@ -8,3 +8,19 @@ MwOO::SubMenu::SubMenu(const char* widget_name, MwOO::Base* parent, int x, int y void MwOO::SubMenu::Appear(MwMenu menu, MwPoint* point){ MwSubMenuAppear(this->widget, menu, point); } +void MwOO::SubMenu::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::SubMenu::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::SubMenu::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::SubMenu::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/text.cc b/oosrc/widget/text.cc index 0ff1985..4d54ed7 100644 --- a/oosrc/widget/text.cc +++ b/oosrc/widget/text.cc @@ -13,3 +13,19 @@ int MwOO::Text::GetChecked(void){ return MwGetInteger(this->widget, MwNchecked); } +void MwOO::Text::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Text::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Text::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Text::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/vulkan.cc b/oosrc/widget/vulkan.cc index 46473e3..e3db0cf 100644 --- a/oosrc/widget/vulkan.cc +++ b/oosrc/widget/vulkan.cc @@ -20,3 +20,19 @@ void* MwOO::Vulkan::GetField(MwVulkanField field, MwErrorEnum* out){ VkBool32 MwOO::Vulkan::Supported(void){ return MwVulkanSupported(this->widget); } +void MwOO::Vulkan::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Vulkan::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Vulkan::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Vulkan::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/oosrc/widget/window.cc b/oosrc/widget/window.cc index 8cdf89c..2ae9a26 100644 --- a/oosrc/widget/window.cc +++ b/oosrc/widget/window.cc @@ -13,3 +13,19 @@ const char* MwOO::Window::GetTitle(void){ return MwGetText(this->widget, MwNtitle); } +void MwOO::Window::SetBackground(const char* value){ + MwSetText(this->widget, MwNbackground, value); +} + +const char* MwOO::Window::GetBackground(void){ + return MwGetText(this->widget, MwNbackground); +} + +void MwOO::Window::SetForeground(const char* value){ + MwSetText(this->widget, MwNforeground, value); +} + +const char* MwOO::Window::GetForeground(void){ + return MwGetText(this->widget, MwNforeground); +} + diff --git a/src/cursor/text.c b/src/cursor/text.c new file mode 100644 index 0000000..df21429 --- /dev/null +++ b/src/cursor/text.c @@ -0,0 +1,66 @@ +/* $Id$ */ +#include + +/** + * Copyright notice: + * Copyright (c) Digital Equipment Corporation,1988. All Rights Reserved. + */ +/** + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notices appear in all copies and + * that both those copyright notices and this permission notice appear + * in supporting documentation, and that the name + * Digital Equipment Corporation not be used in advertising or + * publicity pertaining to distribution of the software without + * specific, written prior permission. Digital + * Equipment Corporation makes no representations about the suitability + * of this software for any purpose. It is provided "as is" without + * express or implied warranty. + * DIGITAL EQUIPMENT CORPORATION DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +MwCursor MwCursorText = { + 7, 16, -3, -7, { + 0, /* ....... */ + 68, /* #...#.. */ + 40, /* .#.#... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 16, /* ..#.... */ + 40, /* .#.#... */ + 68, /* #...#.. */ + 0 /* ....... */ + }}; +MwCursor MwCursorTextMask = { + 7, 16, -3, -7, { + 0, /* ....... */ + 102, /* ##..##. */ + 60, /* .####.. */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 24, /* ..##... */ + 60, /* .####.. */ + 102, /* ##..##. */ + 0 /* ....... */ + }}; diff --git a/src/widget/text.c b/src/widget/text.c index 4f438bd..7eaed71 100644 --- a/src/widget/text.c +++ b/src/widget/text.c @@ -4,6 +4,8 @@ static int create(MwWidget handle) { MwSetDefault(handle); + MwLLSetCursor(handle->lowlevel, &MwCursorText, &MwCursorTextMask); + return 0; } diff --git a/tools/genoo.pl b/tools/genoo.pl index cc6555c..9316902 100755 --- a/tools/genoo.pl +++ b/tools/genoo.pl @@ -1,10 +1,6 @@ #!/usr/bin/env perl # $Id$ -use Config::Tiny; - -my $conf = Config::Tiny->read("resource/widget.ini"); - my $objs = ""; my $decl = ""; @@ -89,6 +85,9 @@ foreach my $f (@files) { } close(IN); + push(@props, "MwNbackground"); + push(@props, "MwNforeground"); + open(OUT, ">", "include/MwOO/Widget/$f"); print(OUT "/* \$Id\$ */\n"); print(OUT "#ifndef __MWOO_WIDGET_" . uc($name) . "_H__\n");