Permalink
Browse files

Changed Tui package to Cui so I can reserve Tui for Touch-User-Interf…

…ace.
  • Loading branch information...
1 parent 6074538 commit 5bc3c945f5cb833385d92e3bf7c36434d32a1f72 @wilkie committed May 3, 2010
View
@@ -3,7 +3,7 @@
*.d~
.DS_Store
winsamp
-tuitetris
+cuitetris
snake
moreducks
*.exe
View
@@ -30,11 +30,11 @@ endif
endif
endif
-DFILES_PLATFORM_MAC = platform/osx/platform/application.d platform/osx/scaffold/system.d platform/osx/scaffold/thread.d platform/osx/scaffold/time.d platform/osx/scaffold/console.d platform/osx/platform/definitions.d platform/osx/common.d platform/osx/main.d platform/osx/scaffold/opengl.d platform/osx/scaffold/graphics.d platform/osx/scaffold/file.d platform/osx/scaffold/socket.d platform/osx/scaffold/window.d platform/osx/scaffold/color.d platform/osx/scaffold/menu.d platform/osx/scaffold/wave.d platform/osx/scaffold/view.d platform/osx/scaffold/directory.d platform/osx/gui/apploop.d binding/c.d binding/ncurses/ncurses.d platform/osx/scaffold/tui.d platform/osx/platform/vars/tui.d platform/osx/platform/vars/file.d platform/unix/common.d platform/osx/platform/vars/thread.d platform/osx/platform/vars/directory.d platform/osx/platform/vars/view.d platform/osx/platform/vars/semaphore.d platform/osx/platform/vars/condition.d platform/osx/platform/vars/window.d
+DFILES_PLATFORM_MAC = platform/osx/platform/application.d platform/osx/scaffold/system.d platform/osx/scaffold/thread.d platform/osx/scaffold/time.d platform/osx/scaffold/console.d platform/osx/platform/definitions.d platform/osx/common.d platform/osx/main.d platform/osx/scaffold/opengl.d platform/osx/scaffold/graphics.d platform/osx/scaffold/file.d platform/osx/scaffold/socket.d platform/osx/scaffold/window.d platform/osx/scaffold/color.d platform/osx/scaffold/menu.d platform/osx/scaffold/wave.d platform/osx/scaffold/view.d platform/osx/scaffold/directory.d platform/osx/gui/apploop.d binding/c.d binding/ncurses/ncurses.d platform/osx/scaffold/cui.d platform/osx/platform/vars/cui.d platform/osx/platform/vars/file.d platform/unix/common.d platform/osx/platform/vars/thread.d platform/osx/platform/vars/directory.d platform/osx/platform/vars/view.d platform/osx/platform/vars/semaphore.d platform/osx/platform/vars/condition.d platform/osx/platform/vars/window.d
OBJC_FILES = platform/osx/objc/window.m platform/osx/objc/app.m platform/osx/objc/view.m
-DFILES_PLATFORM_UNIX = platform/unix/platform/application.d platform/unix/scaffold/system.d platform/unix/scaffold/thread.d platform/unix/scaffold/time.d platform/unix/scaffold/console.d platform/unix/platform/definitions.d platform/unix/common.d binding/cairo/cairo.d binding/x/Xlib.d binding/x/X.d platform/unix/main.d platform/unix/scaffold/opengl.d platform/unix/scaffold/graphics.d platform/unix/scaffold/file.d platform/unix/scaffold/socket.d platform/unix/scaffold/window.d platform/unix/scaffold/color.d platform/unix/scaffold/menu.d platform/unix/scaffold/wave.d platform/unix/scaffold/view.d platform/unix/scaffold/directory.d platform/unix/gui/apploop.d platform/unix/gui/osbutton.d binding/c.d binding/ncurses/ncurses.d platform/unix/scaffold/tui.d platform/unix/platform/vars/tui.d
-DFILES_PLATFORM_WIN = binding/win32/gdipluscolormatrix.d binding/win32/gdiplusinit.d binding/win32/gdiplusmem.d binding/win32/gdiplusbase.d binding/win32/gdiplusflat.d binding/win32/gdiplusstringformat.d binding/win32/gdiplusmetafile.d binding/win32/gdipluslinecaps.d binding/win32/gdiplusimagecodec.d binding/win32/gdiplusgpstubs.d binding/win32/gdiplusfontfamily.d binding/win32/gdiplusfontcollection.d binding/win32/gdiplusfont.d binding/win32/gdiplusenums.d binding/win32/gdiplustypes.d binding/win32/gdiplusregion.d binding/win32/gdipluscolor.d binding/win32/gdiplusbitmap.d binding/win32/gdipluseffects.d binding/win32/gdipluscachedbitmap.d binding/win32/gdipluspath.d binding/win32/gdiplusbrush.d binding/win32/gdipluspen.d binding/win32/gdiplusgraphics.d binding/win32/ws2def.d binding/win32/winsock2.d binding/win32/inaddr.d binding/win32/mmsystem.d binding/win32/wincon.d binding/win32/winbase.d binding/win32/winuser.d binding/win32/windef.d binding/win32/wingdi.d platform/win/platform/application.d platform/win/platform/vars/tui.d platform/win/scaffold/tui.d platform/win/scaffold/system.d platform/win/main.d platform/win/common.d platform/win/platform/vars/menu.d platform/win/platform/vars/view.d platform/win/platform/vars/semaphore.d platform/win/platform/vars/mutex.d platform/win/platform/vars/region.d platform/win/platform/vars/library.d platform/win/platform/vars/wave.d platform/win/platform/vars/pen.d platform/win/platform/vars/brush.d platform/win/platform/vars/window.d platform/win/platform/vars/file.d platform/win/platform/vars/directory.d platform/win/platform/vars/font.d platform/win/platform/vars/socket.d platform/win/scaffold/console.d platform/win/platform/definitions.d platform/win/scaffold/wave.d platform/win/scaffold/directory.d platform/win/scaffold/graphics.d platform/win/scaffold/thread.d platform/win/scaffold/menu.d platform/win/scaffold/window.d platform/win/scaffold/view.d platform/win/scaffold/color.d platform/win/scaffold/file.d platform/win/scaffold/socket.d platform/win/gui/osbutton.d platform/win/scaffold/time.d platform/win/widget.d platform/win/scaffold/opengl.d platform/win/widget.d platform/win/gui/apploop.d
+DFILES_PLATFORM_UNIX = platform/unix/platform/application.d platform/unix/scaffold/system.d platform/unix/scaffold/thread.d platform/unix/scaffold/time.d platform/unix/scaffold/console.d platform/unix/platform/definitions.d platform/unix/common.d binding/cairo/cairo.d binding/x/Xlib.d binding/x/X.d platform/unix/main.d platform/unix/scaffold/opengl.d platform/unix/scaffold/graphics.d platform/unix/scaffold/file.d platform/unix/scaffold/socket.d platform/unix/scaffold/window.d platform/unix/scaffold/color.d platform/unix/scaffold/menu.d platform/unix/scaffold/wave.d platform/unix/scaffold/view.d platform/unix/scaffold/directory.d platform/unix/gui/apploop.d platform/unix/gui/osbutton.d binding/c.d binding/ncurses/ncurses.d platform/unix/scaffold/cui.d platform/unix/platform/vars/cui.d
+DFILES_PLATFORM_WIN = binding/win32/gdipluscolormatrix.d binding/win32/gdiplusinit.d binding/win32/gdiplusmem.d binding/win32/gdiplusbase.d binding/win32/gdiplusflat.d binding/win32/gdiplusstringformat.d binding/win32/gdiplusmetafile.d binding/win32/gdipluslinecaps.d binding/win32/gdiplusimagecodec.d binding/win32/gdiplusgpstubs.d binding/win32/gdiplusfontfamily.d binding/win32/gdiplusfontcollection.d binding/win32/gdiplusfont.d binding/win32/gdiplusenums.d binding/win32/gdiplustypes.d binding/win32/gdiplusregion.d binding/win32/gdipluscolor.d binding/win32/gdiplusbitmap.d binding/win32/gdipluseffects.d binding/win32/gdipluscachedbitmap.d binding/win32/gdipluspath.d binding/win32/gdiplusbrush.d binding/win32/gdipluspen.d binding/win32/gdiplusgraphics.d binding/win32/ws2def.d binding/win32/winsock2.d binding/win32/inaddr.d binding/win32/mmsystem.d binding/win32/wincon.d binding/win32/winbase.d binding/win32/winuser.d binding/win32/windef.d binding/win32/wingdi.d platform/win/platform/application.d platform/win/platform/vars/cui.d platform/win/scaffold/cui.d platform/win/scaffold/system.d platform/win/main.d platform/win/common.d platform/win/platform/vars/menu.d platform/win/platform/vars/view.d platform/win/platform/vars/semaphore.d platform/win/platform/vars/mutex.d platform/win/platform/vars/region.d platform/win/platform/vars/library.d platform/win/platform/vars/wave.d platform/win/platform/vars/pen.d platform/win/platform/vars/brush.d platform/win/platform/vars/window.d platform/win/platform/vars/file.d platform/win/platform/vars/directory.d platform/win/platform/vars/font.d platform/win/platform/vars/socket.d platform/win/scaffold/console.d platform/win/platform/definitions.d platform/win/scaffold/wave.d platform/win/scaffold/directory.d platform/win/scaffold/graphics.d platform/win/scaffold/thread.d platform/win/scaffold/menu.d platform/win/scaffold/window.d platform/win/scaffold/view.d platform/win/scaffold/color.d platform/win/scaffold/file.d platform/win/scaffold/socket.d platform/win/gui/osbutton.d platform/win/scaffold/time.d platform/win/widget.d platform/win/scaffold/opengl.d platform/win/widget.d platform/win/gui/apploop.d
DFILES_PLATFORM_XOMB = platform/xomb/main.d platform/xomb/common.d platform/xomb/scaffold.d platform/xomb/vars.d platform/xomb/console.d platform/xomb/definitions.d platform/xomb/scaffolds/wave.d platform/xomb/scaffolds/graphics.d platform/xomb/scaffolds/thread.d platform/xomb/scaffolds/menu.d platform/xomb/scaffolds/window.d platform/xomb/scaffolds/view.d platform/xomb/scaffolds/color.d platform/xomb/scaffolds/file.d platform/xomb/scaffolds/socket.d platform/xomb/scaffolds/app.d platform/xomb/scaffolds/time.d platform/xomb/oscontrolinterface.d
DFILES_ANALYZING = analyzing/debugger.d
@@ -54,7 +54,7 @@ DFILES_RESOURCE = resource/sound.d resource/image.d resource/resource.d resource
DFILES_CODEC = decoders/decoder.d
DFILES_HASHES = hashes/digest.d hashes/all.d hashes/md5.d hashes/sha1.d hashes/sha224.d hashes/sha256.d
DFILES_CONSOLE = console/prompt.d
-DFILES_TUI = tui/filebox.d tui/container.d tui/dialog.d tui/window.d tui/application.d tui/widget.d tui/telnet.d tui/buffer.d tui/vt100.d tui/listbox.d tui/textfield.d tui/label.d tui/textbox.d tui/codebox.d tui/tabbox.d
+DFILES_CUI = cui/filebox.d cui/container.d cui/dialog.d cui/window.d cui/application.d cui/widget.d cui/telnet.d cui/buffer.d cui/vt100.d cui/listbox.d cui/textfield.d cui/label.d cui/textbox.d cui/codebox.d cui/tabbox.d
DFILES_SCRIPTING = scripting/lua.d
DFILES_BINDING = binding/opengl/gl.d binding/opengl/glu.d binding/lua.d
DFILES_INTERFACES = interfaces/container.d
@@ -66,7 +66,7 @@ DFILES_SYNCH = synch/atomic.d synch/condition.d synch/barrier.d synch/mutex.d sy
DFILES_RSC =
-OBJS_CORE = $(DFILES:.d=.o) $(DFILES_LOCALES:.d=.o) $(DFILES_RESOURCE:.d=.o) $(DFILES_IO:.d=.o) $(DFILES_SYNCH:.d=.o) $(DFILES_PARSING:.d=.o) $(DFILES_OPENGL:.d=.o) $(DFILES_TUI:.d=.o) $(DFILES_ANALYZING:.d=.o) $(DFILES_SCRIPTING:.d=.o) $(DFILES_BINDING:.d=.o) $(DFILES_SPECS:.d=.o) $(DFILES_TESTING:.d=.o) $(DFILES_MATH:.d=.o) $(DFILES_GRAPHICS:.d=.o) $(DFILES_HASHES:.d=.o) $(DFILES_RSC:.d=.o) $(DFILES_NETWORKING:.d=.o) $(DFILES_INTERFACES:.d=.o) $(DFILES_DATA:.d=.o) $(DFILES_CONSOLE:.d=.o) $(DFILES_BINARY_CODECS:.d=.o) $(DFILES_CODEC:.d=.o) $(DFILES_IMAGE_CODECS:.d=.o) $(DFILES_AUDIO_CODECS:.d=.o) $(DFILES_CORE:.d=.o) $(DFILES_GUI:.d=.o) $(DFILES_PARSERS:.d=.o)
+OBJS_CORE = $(DFILES:.d=.o) $(DFILES_LOCALES:.d=.o) $(DFILES_RESOURCE:.d=.o) $(DFILES_IO:.d=.o) $(DFILES_SYNCH:.d=.o) $(DFILES_PARSING:.d=.o) $(DFILES_OPENGL:.d=.o) $(DFILES_CUI:.d=.o) $(DFILES_ANALYZING:.d=.o) $(DFILES_SCRIPTING:.d=.o) $(DFILES_BINDING:.d=.o) $(DFILES_SPECS:.d=.o) $(DFILES_TESTING:.d=.o) $(DFILES_MATH:.d=.o) $(DFILES_GRAPHICS:.d=.o) $(DFILES_HASHES:.d=.o) $(DFILES_RSC:.d=.o) $(DFILES_NETWORKING:.d=.o) $(DFILES_INTERFACES:.d=.o) $(DFILES_DATA:.d=.o) $(DFILES_CONSOLE:.d=.o) $(DFILES_BINARY_CODECS:.d=.o) $(DFILES_CODEC:.d=.o) $(DFILES_IMAGE_CODECS:.d=.o) $(DFILES_AUDIO_CODECS:.d=.o) $(DFILES_CORE:.d=.o) $(DFILES_GUI:.d=.o) $(DFILES_PARSERS:.d=.o)
OBJS_MAC = $(OBJS_CORE) $(DFILES_PLATFORM_MAC:.d=.o) $(OBJC_FILES:.m=.o)
@@ -80,7 +80,7 @@ TOOLS_DSPEC = tools/dspec/main.d tools/dspec/feeder.d tools/dspec/filelist.d too
TOOLS_DSCRIBE = tools/dscribe/main.d tools/dscribe/lexer.d
TOOLS_TESTS = runtests.d
-EXAMPLES_TUITETRIS = examples/TuiTetris/app.d examples/TuiTetris/gamewindow.d examples/TuiTetris/tetris.d examples/TuiTetris/gamecontrol.d
+EXAMPLES_CUITETRIS = examples/CuiTetris/app.d examples/CuiTetris/gamewindow.d examples/CuiTetris/tetris.d examples/CuiTetris/gamecontrol.d
EXAMPLES_MOREDUCKS = examples/MoreDucks/MoreDucks.d
@@ -224,17 +224,17 @@ else
endif
endif
-tuitetris: lib
+cuitetris: lib
- @echo compiling TuiTetris example and linking...
+ @echo compiling CuiTetris example and linking...
ifeq (${MY_ARCH},Darwin)
- for i in ${EXAMPLES_TUITETRIS}; do $(DC) "$${i}" $(DFLAGS) -d-version=PlatformOSX -c -of$${i}.o -O3 -J./tests -I./examples/TuiTetris -I./platform/osx; done
- $(OBJCC) -m32 $(OBJS_MAC) `ls examples/TuiTetris/*.o` -o tuitetris $(LFLAGS_MAC) -ltango
+ for i in ${EXAMPLES_CUITETRIS}; do $(DC) "$${i}" $(DFLAGS) -d-version=PlatformOSX -c -of$${i}.o -O3 -J./tests -I./examples/CuiTetris -I./platform/osx; done
+ $(OBJCC) -m32 $(OBJS_MAC) `ls examples/CuiTetris/*.o` -o cuitetris $(LFLAGS_MAC) -ltango
else
ifeq ($(PLATFORM),WINDOWS)
- @dmd.exe -w -version=PlatformWindows -oftuitetris.exe $(EXAMPLES_TUITETRIS) $(OBJS_WIN) $(LFLAGS_WIN)
+ @dmd.exe -w -version=PlatformWindows -ofcuitetris.exe $(EXAMPLES_CUITETRIS) $(OBJS_WIN) $(LFLAGS_WIN)
else
- @$(DC) $(LFLAGS_LINUX) -oftuitetris -d-version=PlatformLinux $(EXAMPLES_TUITETRIS) $(OBJS_LINUX)
+ @$(DC) $(LFLAGS_LINUX) -ofcuitetris -d-version=PlatformLinux $(EXAMPLES_CUITETRIS) $(OBJS_LINUX)
endif
endif
View
@@ -299,13 +299,13 @@ else {
alias long Clong;
}
-union TuiEventInfo {
+union CuiEventInfo {
Key key;
Mouse mouse;
Size size;
}
-struct TuiEvent {
+struct CuiEvent {
enum Type {
KeyDown,
KeyUp,
@@ -319,6 +319,6 @@ struct TuiEvent {
}
Type type;
- TuiEventInfo info;
+ CuiEventInfo info;
uint aux;
}
@@ -1,42 +1,42 @@
-module tui.application;
+module cui.application;
-import tui.window;
+import cui.window;
import core.application;
import core.string;
import core.event;
import core.main;
import core.definitions;
-import scaffold.tui;
+import scaffold.cui;
-import platform.vars.tui;
+import platform.vars.cui;
import io.console;
// Description: This class represents a Text User Interface application (TUI).
-class TuiApplication : Application {
+class CuiApplication : Application {
public:
this() {
- TuiStart(&_pfvars);
+ CuiStart(&_pfvars);
super();
}
this(string appName) {
- TuiStart(&_pfvars);
+ CuiStart(&_pfvars);
super(appName);
}
override void push(Dispatcher dsp) {
super.push(dsp);
- if (cast(TuiWindow)dsp !is null) {
- setWindow(cast(TuiWindow)dsp);
+ if (cast(CuiWindow)dsp !is null) {
+ setWindow(cast(CuiWindow)dsp);
}
}
- TuiWindow window() {
+ CuiWindow window() {
return _curConsoleWindow;
}
@@ -46,12 +46,12 @@ public:
protected:
- TuiWindow _curConsoleWindow;
+ CuiWindow _curConsoleWindow;
- TuiPlatformVars _pfvars;
+ CuiPlatformVars _pfvars;
override void shutdown() {
- TuiEnd(&_pfvars);
+ CuiEnd(&_pfvars);
}
override void start() {
@@ -64,7 +64,7 @@ protected:
private:
- void setWindow(TuiWindow window) {
+ void setWindow(CuiWindow window) {
_curConsoleWindow = window;
// Draw Window
@@ -75,31 +75,31 @@ private:
void eventLoop() {
while(_running) {
- TuiEvent evt;
+ CuiEvent evt;
if (_curConsoleWindow is null) {
continue;
}
- TuiNextEvent(&evt, &_pfvars);
+ CuiNextEvent(&evt, &_pfvars);
switch(evt.type) {
- case TuiEvent.Type.KeyDown:
+ case CuiEvent.Type.KeyDown:
_curConsoleWindow.onKeyDown(evt.info.key);
dchar chr;
if (isPrintable(evt.info.key, chr)) {
_curConsoleWindow.onKeyChar(chr);
}
break;
- case TuiEvent.Type.MouseDown:
+ case CuiEvent.Type.MouseDown:
break;
- case TuiEvent.Type.MouseUp:
+ case CuiEvent.Type.MouseUp:
break;
- case TuiEvent.Type.MouseMove:
+ case CuiEvent.Type.MouseMove:
break;
- case TuiEvent.Type.Close:
+ case CuiEvent.Type.Close:
this.exit(evt.aux);
break;
- case TuiEvent.Type.Size:
+ case CuiEvent.Type.Size:
_curConsoleWindow._onResize();
break;
default:
@@ -1,4 +1,4 @@
-module tui.buffer;
+module cui.buffer;
import core.string;
import core.main;
@@ -10,12 +10,12 @@ import synch.semaphore;
import io.console;
-import tui.widget;
+import cui.widget;
// Section: Console
// Description: This console control is a line buffer that is similar to having a terminal inside a terminal. It is basically a terminal window. Extending this class will allow for other types of terminals and emulations. For instance, the VT100 control is a buffer control with VT100 ANSI emulation.
-class TuiBuffer : TuiWidget
+class CuiBuffer : CuiWidget
{
this( uint x, uint y, uint width, uint height)
{
@@ -8,17 +8,17 @@
*
*/
-module tui.codebox;
+module cui.codebox;
-import tui.textbox;
+import cui.textbox;
import io.console;
import core.regex;
import core.string;
import core.definitions;
-class TuiCodeBox : TuiTextBox {
+class CuiCodeBox : CuiTextBox {
// Constructors
@@ -1,32 +1,32 @@
/*
* container.d
*
- * This module implements a widget container for TuiWidget.
+ * This module implements a widget container for CuiWidget.
*
* Author: Dave Wilkinson
* Originated: August 20th 2009
*
*/
-module tui.container;
+module cui.container;
-import tui.widget;
+import cui.widget;
import core.event;
import core.definitions;
import core.string;
private import io.console;
-class TuiContainer : TuiWidget {
+class CuiContainer : CuiWidget {
this(uint x, uint y, uint width, uint height) {
_name = "";
super(x,y,width,height);
}
override void onInit() {
_inited = true;
- TuiWidget c = _firstControl;
+ CuiWidget c = _firstControl;
if (c is null) { return; }
@@ -41,7 +41,7 @@ class TuiContainer : TuiWidget {
override void onGotFocus() {
if (_focusedControl is null) {
- TuiWidget c = _firstControl;
+ CuiWidget c = _firstControl;
if (c is null) { return; }
@@ -69,7 +69,7 @@ class TuiContainer : TuiWidget {
// Go through child widget list and draw each one
Console.position(0,0);
- TuiWidget c = _firstControl;
+ CuiWidget c = _firstControl;
io.console.Console.clipSave();
@@ -173,9 +173,9 @@ class TuiContainer : TuiWidget {
}
override void push(Dispatcher dsp) {
- if (cast(TuiWidget)dsp) {
+ if (cast(CuiWidget)dsp) {
// do not add a control that is already part of another window
- TuiWidget control = cast(TuiWidget)dsp;
+ CuiWidget control = cast(CuiWidget)dsp;
if (control._nextControl !is null) {
return;
@@ -248,11 +248,11 @@ class TuiContainer : TuiWidget {
protected:
// head and tail of the control linked list
- TuiWidget _firstControl; //head
- TuiWidget _lastControl; //tail
+ CuiWidget _firstControl; //head
+ CuiWidget _lastControl; //tail
// currently focused control
- TuiWidget _focusedControl;
+ CuiWidget _focusedControl;
uint _numControls;
@@ -262,7 +262,7 @@ protected:
string _name;
void _reportMove(uint x, uint y) {
- TuiWidget c = _firstControl;
+ CuiWidget c = _firstControl;
if (c is null) {
super.move(x,y);
@@ -273,16 +273,16 @@ protected:
c = c._prevControl;
c._base_x = _base_x + x;
c._base_y = _base_y + y;
- if (cast(TuiContainer)c) {
- TuiContainer container = cast(TuiContainer)c;
+ if (cast(CuiContainer)c) {
+ CuiContainer container = cast(CuiContainer)c;
container._reportMove(c.left, c.top);
}
} while (c !is _firstControl);
}
package void _tabForward() {
// activate the next control
- TuiWidget curFocus = _focusedControl;
+ CuiWidget curFocus = _focusedControl;
if (curFocus is null) { return; }
@@ -302,7 +302,7 @@ protected:
package void _tabBackward() {
// activate the previous control
- TuiWidget curFocus = _focusedControl;
+ CuiWidget curFocus = _focusedControl;
if (curFocus is null) { return; }
Oops, something went wrong.

0 comments on commit 5bc3c94

Please sign in to comment.