[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r5071 - in trunk: gnue-common/src/cursing gnue-forms/src/uidrivers/curse
From: |
jcater |
Subject: |
r5071 - in trunk: gnue-common/src/cursing gnue-forms/src/uidrivers/curses gnue-forms/src/uidrivers/curses/widgets gnue-forms/src/uidrivers/curses/widgets/form |
Date: |
Thu, 5 Feb 2004 17:13:18 -0600 (CST) |
Author: jcater
Date: 2004-02-05 17:13:16 -0600 (Thu, 05 Feb 2004)
New Revision: 5071
Removed:
trunk/gnue-common/src/cursing/Event.py
Modified:
trunk/gnue-common/src/cursing/Button.py
trunk/gnue-common/src/cursing/CheckBox.py
trunk/gnue-common/src/cursing/CheckBoxGroup.py
trunk/gnue-common/src/cursing/ColorScheme.py
trunk/gnue-common/src/cursing/ComboBox.py
trunk/gnue-common/src/cursing/Control.py
trunk/gnue-common/src/cursing/Dialog.py
trunk/gnue-common/src/cursing/DirChooser.py
trunk/gnue-common/src/cursing/FileSelectPad.py
trunk/gnue-common/src/cursing/FileSelector.py
trunk/gnue-common/src/cursing/FocusedLabel.py
trunk/gnue-common/src/cursing/Frame.py
trunk/gnue-common/src/cursing/GraphicObject.py
trunk/gnue-common/src/cursing/GroupBox.py
trunk/gnue-common/src/cursing/InputBox.py
trunk/gnue-common/src/cursing/Label.py
trunk/gnue-common/src/cursing/Menu.py
trunk/gnue-common/src/cursing/MenuBar.py
trunk/gnue-common/src/cursing/MenuItem.py
trunk/gnue-common/src/cursing/MsgBoxOK.py
trunk/gnue-common/src/cursing/MsgBoxTimer.py
trunk/gnue-common/src/cursing/MsgBoxYesNo.py
trunk/gnue-common/src/cursing/Notebook.py
trunk/gnue-common/src/cursing/Progress.py
trunk/gnue-common/src/cursing/RadioButton.py
trunk/gnue-common/src/cursing/RadioGroup.py
trunk/gnue-common/src/cursing/ScreenContainer.py
trunk/gnue-common/src/cursing/ScrollBar.py
trunk/gnue-common/src/cursing/StatusBar.py
trunk/gnue-common/src/cursing/TextArea.py
trunk/gnue-common/src/cursing/TextBox.py
trunk/gnue-common/src/cursing/VButton.py
trunk/gnue-common/src/cursing/VScrollBar.py
trunk/gnue-common/src/cursing/constants.py
trunk/gnue-common/src/cursing/sio.py
trunk/gnue-common/src/cursing/utility.py
trunk/gnue-forms/src/uidrivers/curses/UIdriver.py
trunk/gnue-forms/src/uidrivers/curses/__init__.py
trunk/gnue-forms/src/uidrivers/curses/common.py
trunk/gnue-forms/src/uidrivers/curses/widgets/_base.py
trunk/gnue-forms/src/uidrivers/curses/widgets/box.py
trunk/gnue-forms/src/uidrivers/curses/widgets/button.py
trunk/gnue-forms/src/uidrivers/curses/widgets/entry.py
trunk/gnue-forms/src/uidrivers/curses/widgets/form/widget.py
trunk/gnue-forms/src/uidrivers/curses/widgets/form/wrappers.py
trunk/gnue-forms/src/uidrivers/curses/widgets/label.py
trunk/gnue-forms/src/uidrivers/curses/widgets/scrollbar.py
Log:
playing around with curses again
Modified: trunk/gnue-common/src/cursing/Button.py
===================================================================
--- trunk/gnue-common/src/cursing/Button.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Button.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Control import Control
import curses
@@ -37,7 +37,7 @@
#
class Button(Control):
def __init__(self, Parent, ButtonName, Y, X, W, Caption, **properties):
- apply (Control.__init__, (self, Parent, ButtonName), properties)
+ Control.__init__(self, Parent, ButtonName, **properties)
self.PARENT = Parent
self.X = X
self.Y = Y
Modified: trunk/gnue-common/src/cursing/CheckBox.py
===================================================================
--- trunk/gnue-common/src/cursing/CheckBox.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/CheckBox.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,14 +26,13 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from RadioButton import RadioButton
class CheckBox(RadioButton):
def __init__( self, Root, Name, Y,X, Caption, Id, **properties):
- apply( RadioButton.__init__,
- (self, Root, Name, Y,X, Caption, Id), properties)
+ RadioButton.__init__(self, Root, Name, Y,X, Caption, Id, **properties)
cap = self.CAPTION
cap = cap[:1] + 'O' + cap[2:]
self.CAPTION = cap
Modified: trunk/gnue-common/src/cursing/CheckBoxGroup.py
===================================================================
--- trunk/gnue-common/src/cursing/CheckBoxGroup.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/CheckBoxGroup.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import math
from constants import *
@@ -35,7 +35,7 @@
class CheckBoxGroup(RadioGroup):
def __init__(self,Root,GroupName,Y,X,W,**properties):
- apply(RadioGroup.__init__,(self,Root,GroupName,Y,X,W),properties)
+ RadioGroup.__init__(self,Root,GroupName,Y,X,W,**properties)
self._activeState = 0
def _ToggleItem( self, item, v2,v3):
Modified: trunk/gnue-common/src/cursing/ColorScheme.py
===================================================================
--- trunk/gnue-common/src/cursing/ColorScheme.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/ColorScheme.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -27,9 +27,9 @@
#
import curses, sys
-from gnue.common.apps import GDebug
+
class ColorScheme:
def loadColors(self, text):
# temp
@@ -81,7 +81,7 @@
self.__dict__['CP_%s'%attr] = (mod, pr)
self.__dict__['C_%s'%attr] = v | mod
- GDebug.printMesg(5,'C_%s = %s' % (attr, v|mod))
+ gDebug(5,'C_%s = %s' % (attr, v|mod))
pair += 1
Modified: trunk/gnue-common/src/cursing/ComboBox.py
===================================================================
--- trunk/gnue-common/src/cursing/ComboBox.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/ComboBox.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Menu import Menu
from Button import Button
@@ -79,7 +79,7 @@
self._menu.ChangeTitle(text)
chosen = self.GetMethod("CHOSEN")
if chosen!=None:
- apply(chosen,(self,id,text))
+ chosen(self,id,text)
def AddItem(self,id,text):
self._menu.AddItem(id,text)
@@ -90,8 +90,8 @@
self.VALUES = []
# def SetValue(self, value):
-# GDebug.printMesg(0,'WARNING: SetValue called on a combo box... not yet
implemented')
+# gDebug(0,'WARNING: SetValue called on a combo box... not yet implemented')
# def GetValue(self):
-# GDebug.printMesg(0,'WARNING: GetValue called on a combo box... not yet
implemented')
+# gDebug(0,'WARNING: GetValue called on a combo box... not yet implemented')
Modified: trunk/gnue-common/src/cursing/Control.py
===================================================================
--- trunk/gnue-common/src/cursing/Control.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Control.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,14 +26,13 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from GraphicObject import GraphicObject
class Control(GraphicObject):
def __init__(self, Parent, CName, **properties):
- apply (GraphicObject.__init__, (self, Parent.SCREEN),
- properties)
+ GraphicObject.__init__(self, Parent.SCREEN, **properties)
self.NAME = CName
self.SetColor('DIALOG','BACKGROUND')
self.X = -1
Modified: trunk/gnue-common/src/cursing/Dialog.py
===================================================================
--- trunk/gnue-common/src/cursing/Dialog.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Dialog.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -31,7 +31,7 @@
### subclass the new Frame class
###
-from gnue.common.apps import GDebug
+
from constants import *
import sio
from utility import _paintBorder
@@ -46,7 +46,7 @@
def __init__(self, ParentContainer, r1=0, c1=0, r2=0, c2=0, caption="",
border=1, dropshadow=1, **properties):
SIOInstance = ParentContainer.Screen()
- apply (ScreenContainer.__init__, (self, SIOInstance), properties)
+ ScreenContainer.__init__(self, SIOInstance,**properties)
self.PARENT = ParentContainer
self.scrnbuff = {}
self.Controls = []
Modified: trunk/gnue-common/src/cursing/DirChooser.py
===================================================================
--- trunk/gnue-common/src/cursing/DirChooser.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/DirChooser.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import os
import string
@@ -37,7 +37,7 @@
class DirChooser(Control):
def __init__(self, Root, Y, X, W, Start, Name="", **properties):
- apply(Control.__init__, (self, Root, Name), properties)
+ Control.__init__(self, Root, Name, properties)
self.X = X
self.Y = Y
self.W = int(W)
Deleted: trunk/gnue-common/src/cursing/Event.py
===================================================================
--- trunk/gnue-common/src/cursing/Event.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Event.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -1,66 +0,0 @@
-#
-# This file is part of GNU Enterprise.
-#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with program; see the file COPYING. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-# Copyright 2002-2004 Free Software Foundation
-#
-# FILE:
-# Event.py
-#
-# DESCRIPTION:
-#
-# NOTES:
-#
-
-from gnue.common.apps import GDebug
-
-class Event:
- """
- UserInteraction-Event (Mouseclick, Keypress)
- """
- def __init__(self):
- self._type = none
- self._keycode = -1
- self._x = -1
- self._y = -1
-
- def getKeycode(self):
- """
- return the code of the pressed key
- """
- return self._keycode
-
- def isMouseEvent(self):
- """
- return wether this event is a mouse event
- """
- return self._type == mouse
-
- def getX(self):
- """
- return the x-position of a mouse-event
- -1 if the event is not mouse-related
- """
- return self._x
-
- def getY(self):
- """
- return the y-position of a mouse-event
- -1 if the event is not mouse-related
- """
- return self._y
-
Modified: trunk/gnue-common/src/cursing/FileSelectPad.py
===================================================================
--- trunk/gnue-common/src/cursing/FileSelectPad.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/FileSelectPad.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import os
import string
import curses
@@ -42,7 +42,7 @@
__threshhold__ = 250
def __init__(self, Root, Y, X,H, W, **properties):
- apply(Control.__init__, (self, Root, ''), properties)
+ Control.__init__(self, Root, '', properties)
self.Y = Y
self.ROWS = H
self.X = X
Modified: trunk/gnue-common/src/cursing/FileSelector.py
===================================================================
--- trunk/gnue-common/src/cursing/FileSelector.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/FileSelector.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import os
import math
@@ -51,7 +51,7 @@
H = int(math.floor(Root.Height() * 0.6))
Y = int(math.floor((Root.Height() - H) / 2))
- apply(Dialog.__init__, (self,Root, Y, X, Y + H, X + W),properties)
+ Dialog.__init__(self,Root, Y, X, Y + H, X + W,**properties)
self.start = os.environ['PWD']
# allow arbitrary path to be sent in as 'START'
Modified: trunk/gnue-common/src/cursing/FocusedLabel.py
===================================================================
--- trunk/gnue-common/src/cursing/FocusedLabel.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/FocusedLabel.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Label import Label
@@ -37,8 +37,7 @@
and the like.
"""
def __init__(self, Parent, LabelName, Y, X, Caption, **properties):
- apply (Label.__init__, (self, Parent, LabelName, Y, X, Caption),
- properties)
+ Label.__init__(self, Parent, LabelName, Y, X, Caption, **properties)
self.CANGETFOCUS = 1
self.SetMethod("SYSRUN", self.Run)
self.SetMethod("SYSPAINT", self.Paint)
@@ -71,7 +70,7 @@
self.ExecMethod("SYSGOTFOCUS", None, None, None)
def Paint(self, HasFocus, v2, v3):
- GDebug.printMesg(0,'Workin it')
+ gDebug(0,'Workin it')
Container = self.PARENT.Screen()
if self.active:
if HasFocus :
Modified: trunk/gnue-common/src/cursing/Frame.py
===================================================================
--- trunk/gnue-common/src/cursing/Frame.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Frame.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
import sio
from utility import _paintBorder
@@ -41,7 +41,7 @@
def __init__(self, ParentContainer, r1=0, c1=0, r2=0, c2=0, caption="",
border=1, dropshadow=1, **properties):
SIOInstance = ParentContainer.Screen()
- apply (ScreenContainer.__init__, (self, SIOInstance), properties)
+ ScreenContainer.__init__(self, SIOInstance, **properties)
self.PARENT = ParentContainer
self.PARENT.AddFrame(self)
self.VISIBLE = 0
@@ -88,7 +88,7 @@
## self.PARENT.Paint()
def _PaintBorder(self):
- GDebug.printMesg(2,'(!!!) PaintBorder')
+ gDebug(2,'(!!!) PaintBorder')
if not self.BORDER:
return
@@ -114,10 +114,10 @@
if self.BORDER:
self._PaintBorder()
else:
- GDebug.printMesg(0,'PAINTING %s' % self)
+ gDebug(0,'PAINTING %s' % self)
- for l in range(self.H):
- self.SCREEN.PrintAt(self.Y+l, self.X, " " * self.W, self.COLOR)
+ for l in range(self._DialogHeight):
+ self.SCREEN.PrintAt(self._Y+l, self._X, " " * self._DialogWidth,
self.COLOR)
self._PaintDropShadow()
ScreenContainer.Paint(self,*args, **parms)
Modified: trunk/gnue-common/src/cursing/GraphicObject.py
===================================================================
--- trunk/gnue-common/src/cursing/GraphicObject.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/GraphicObject.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import curses
from constants import *
Modified: trunk/gnue-common/src/cursing/GroupBox.py
===================================================================
--- trunk/gnue-common/src/cursing/GroupBox.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/GroupBox.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
import sio
from utility import _paintBorder
@@ -34,7 +34,7 @@
class GroupBox(Control):
def __init__( self, Root, Name, Y,X,W,H, Title='', **properties):
- apply(Control.__init__,(self, Root, Name), properties)
+ Control.__init__(self, Root, Name, **properties)
self.active = 0
self.Y = Y
self.X = X
Modified: trunk/gnue-common/src/cursing/InputBox.py
===================================================================
--- trunk/gnue-common/src/cursing/InputBox.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/InputBox.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Button import Button
from Dialog import Dialog
@@ -51,7 +51,7 @@
c1 = (sMCOL - DialogWidth) / 2
c2 = c1 + DialogWidth
- apply(Dialog.__init__, (self, Parent, r1, c1, r2, c2), properties)
+ Dialog.__init__(self, Parent, r1, c1, r2, c2, **properties)
tCmdOK = Button(self, "OKBtn", 5, (DialogWidth - 10) / 4, 10, "OK")
tCmdOK.EXITFORM = 1
Modified: trunk/gnue-common/src/cursing/Label.py
===================================================================
--- trunk/gnue-common/src/cursing/Label.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Label.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from re import search
from string import split
@@ -42,7 +42,7 @@
def __init__(self, Parent, LabelName, Y, X, Caption, Width=0,
**properties):
- apply (Control.__init__, (self, Parent, LabelName), properties)
+ Control.__init__(self, Parent, LabelName, **properties)
self.PadHeight = 2 # pad the height by this much if multiline
self.PARENT = Parent
self.X = X
Modified: trunk/gnue-common/src/cursing/Menu.py
===================================================================
--- trunk/gnue-common/src/cursing/Menu.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Menu.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from FocusedLabel import FocusedLabel
from Dialog import Dialog
@@ -39,7 +39,7 @@
statusBarLink=None, **properties):
self.maxLengthFixed = 0
DisplayName = self.__FixDisplay(DisplayName)
- apply(FocusedLabel.__init__, (self,Parent,MenuName,Y,X,DisplayName),
properties)
+ FocusedLabel.__init__(self,Parent,MenuName,Y,X,DisplayName, **properties)
self.PARENT = Parent
self.STATUSBARLINK = statusBarLink
self.SetMethod("CLICK",self.ShowOff)
@@ -149,7 +149,7 @@
apply(self.GetMethod("CHOSEN"),(self,control.ITEMID,control.TITLE))
def ItemFocused(self,control, arg2,arg3):
- GDebug.printMesg(0,'I got that focused feeling!')
+ gDebug(0,'I got that focused feeling!')
self.ShowStatusBarText(control.DESCRIPTION)
return 1
Modified: trunk/gnue-common/src/cursing/MenuBar.py
===================================================================
--- trunk/gnue-common/src/cursing/MenuBar.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/MenuBar.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Frame import Frame
from Menu import Menu
@@ -36,7 +36,7 @@
def __init__(self, Root, Y, X, W, **properties):
Frame.__init__(self, Root, Y, X, Y+1, X + W - 1,
border=0, dropshadow=0, **properties)
- GDebug.printMesg(0,'WIDTH=%s' % W)
+ gDebug(0,'WIDTH=%s' % W)
self.rootwin = Root
self.CANGETFOCUS = 0
self.Y = Y
@@ -55,7 +55,7 @@
return newEntry
def SetStatusBar(self, statusbar, index=0):
- GDebug.printMesg(0,'SETTING STATUSBAR')
+ gDebug(0,'SETTING STATUSBAR')
self.STATUSBAR = statusbar
self.STATUSBAR_INDEX = index
Modified: trunk/gnue-common/src/cursing/MenuItem.py
===================================================================
--- trunk/gnue-common/src/cursing/MenuItem.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/MenuItem.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,14 +26,14 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from FocusedLabel import FocusedLabel
class MenuItem(FocusedLabel):
def __init__(self,Parent,MenuName,Y,X,DisplayName = "", itemDescription="",
statusbarlink=None, **properties):
- apply(FocusedLabel.__init__, (self,Parent,MenuName,Y,X,DisplayName),
properties)
+ FocusedLabel.__init__(self,Parent,MenuName,Y,X,DisplayName, **properties)
self.TITLE = DisplayName
self.DESCRIPTION = itemDescription
self.STATUSBARLINK = statusbarlink
Modified: trunk/gnue-common/src/cursing/MsgBoxOK.py
===================================================================
--- trunk/gnue-common/src/cursing/MsgBoxOK.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/MsgBoxOK.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Button import Button
from Label import Label
@@ -55,7 +55,7 @@
c1 = (sMCOL - DialogWidth) / 2
c2 = c1 + DialogWidth
- apply(Dialog.__init__, (self, Parent, r1, c1, r2, c2), properties)
+ Dialog.__init__(self, Parent, r1, c1, r2, c2, **properties)
tCmd = Button(self, "TheBtn", 5, (DialogWidth - 6) / 2, 6, "OK")
tCmd.EXITFORM = 1
Modified: trunk/gnue-common/src/cursing/MsgBoxTimer.py
===================================================================
--- trunk/gnue-common/src/cursing/MsgBoxTimer.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/MsgBoxTimer.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Button import Button
from Label import Label
@@ -55,7 +55,7 @@
c1 = (sMCOL - DialogWidth) / 2
c2 = c1 + DialogWidth
- apply(Dialog.__init__, (self, Parent, r1, c1, r2, c2), properties)
+ Dialog.__init__(self, Parent, r1, c1, r2, c2, **properties)
tCmd = Button(self, "TheBtn", 5, (DialogWidth - 6) / 2, 6, "OK")
tCmd.EXITFORM = 1
Modified: trunk/gnue-common/src/cursing/MsgBoxYesNo.py
===================================================================
--- trunk/gnue-common/src/cursing/MsgBoxYesNo.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/MsgBoxYesNo.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,8 +26,8 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
# TODO: this looks strangely like another MsgBox class -- is it really
# needed?
@@ -56,7 +56,7 @@
c1 = (sMCOL - DialogWidth) / 2
c2 = c1 + DialogWidth
- apply(Dialog.__init__, (self, Parent, r1, c1, r2, c2), properties)
+ Dialog.__init__(self, Parent, r1, c1, r2, c2, **properties)
tCmdYes = Button(self, "YesBtn", 5, (DialogWidth - 7) / 4, 7, "Yes")
tCmdYes.EXITFORM = 1
self.AddDialogControl(tCmdYes)
Modified: trunk/gnue-common/src/cursing/Notebook.py
===================================================================
--- trunk/gnue-common/src/cursing/Notebook.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Notebook.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
import sio
from utility import _paintBorder
@@ -42,7 +42,7 @@
**properties):
SIOInstance = ParentContainer.Screen()
Frame.__init__(ParentContainer, r1, c1, r2, c2, border=1, dropshadow=0)
- apply (ScreenContainer.__init__, (self, SIOInstance), properties)
+ ScreenContainer.__init__(self, SIOInstance, **properties)
self._ChildOffsetY += 2
def __del__(self):
@@ -88,7 +88,7 @@
**properties):
self.maxLengthFixed = 0
DisplayName = self.__FixDisplay(DisplayName)
- apply(FocusedLabel.__init__, (self,Parent,MenuName,Y,X,DisplayName),
properties)
+ FocusedLabel.__init__(self,Parent,MenuName,Y,X,DisplayName, **properties)
self.PARENT = Parent
self.SetMethod("CLICK",self.ShowOff)
self.items = []
Modified: trunk/gnue-common/src/cursing/Progress.py
===================================================================
--- trunk/gnue-common/src/cursing/Progress.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/Progress.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,8 +26,8 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
#
# TODO: Paint still needs some refinement possibly. Specifically some sort of
# TODO: flags for 'REFRESH' method calls. Seems to work OK though.
@@ -42,7 +42,7 @@
""" a simple progress bar
"""
def __init__(self, Parent, ProgressName, Y, X, W, Max, **properties):
- apply (Control.__init__, (self, Parent, ProgressName), properties)
+ Control.__init__(self, Parent, ProgressName, **properties)
self.PARENT = Parent
self.X = X
self.Y = Y
Modified: trunk/gnue-common/src/cursing/RadioButton.py
===================================================================
--- trunk/gnue-common/src/cursing/RadioButton.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/RadioButton.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from FocusedLabel import FocusedLabel
@@ -35,7 +35,7 @@
"""
def __init__(self,Root, Name, Y, X, Caption, Id, **properties):
Caption = ' o ' + Caption
- apply(FocusedLabel.__init__,(self,Root,Name,Y,X,Caption),properties)
+ FocusedLabel.__init__(self,Root,Name,Y,X,Caption,**properties)
self.ID = Id
self.SetMethod("PAINT",self.Paint)
self.X = X
Modified: trunk/gnue-common/src/cursing/RadioGroup.py
===================================================================
--- trunk/gnue-common/src/cursing/RadioGroup.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/RadioGroup.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from RadioButton import RadioButton
from Control import Control
@@ -35,7 +35,7 @@
"""
"""
def __init__(self, Root, GroupName, Y, X, W,**properties):
- apply(Control.__init__,(self,Root,GroupName),properties)
+ Control.__init__(self,Root,GroupName,**properties)
self.Y = Y
self.X = X
self.W = W
Modified: trunk/gnue-common/src/cursing/ScreenContainer.py
===================================================================
--- trunk/gnue-common/src/cursing/ScreenContainer.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-common/src/cursing/ScreenContainer.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import math
import curses
##try:
@@ -64,7 +64,7 @@
self.Metrics = {} # ditionary of dimensions, keyed by control obj
self.VISIBLE = 1
- apply(GraphicObject.__init__, (self, SIOInstance), properties)
+ GraphicObject.__init__(self, SIOInstance, **properties)
self.STARTPOINT = 0
self.breakUp = 0
@@ -185,9 +185,9 @@
if myCsi == None:
myCsi = 0
- GDebug.printMesg(0, 'I am a running fewl; s/I/%s/' % self)
- GDebug.printMesg(0, self._CurrentFrame)
- GDebug.printMesg(0, self.Controls)
+ gDebug(0, 'I am a running fewl; s/I/%s/' % self)
+ gDebug(0, self._CurrentFrame)
+ gDebug(0, self.Controls)
# event loop runs forever
while 1:
@@ -373,7 +373,7 @@
def GetControlAt(self, Y, X):
# Check any child frames first
for frame in self.FrameStackOrder:
- if frame.VISIBLE and frame.C1 <= X <= frame.C2 and frame.R1 <= Y <= R2:
+ if frame.VISIBLE and frame.C1 <= X <= frame.C2 and frame.R1 <= Y <=
frame.R2:
return frame.GetControlAt(Y, X) or frame
# Now check our controls
Modified: trunk/gnue-common/src/cursing/ScrollBar.py
===================================================================
--- trunk/gnue-common/src/cursing/ScrollBar.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/ScrollBar.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import math
import string
import curses
@@ -40,7 +40,7 @@
horizontal only :-(
"""
def __init__(self, Parent, SBName, Y, X, W, **properties):
- apply(Control.__init__, (self,Parent,SBName),properties)
+ Control.__init__(self,Parent,SBName,**properties)
self.CANGETFOCUS = 1
self.H = 1
self.W = W
Modified: trunk/gnue-common/src/cursing/StatusBar.py
===================================================================
--- trunk/gnue-common/src/cursing/StatusBar.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/StatusBar.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -19,14 +19,14 @@
# Copyright 2002-2004 Free Software Foundation
#
# FILE:
-# Label.py
+# StatusBar.py
#
# DESCRIPTION:
#
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from re import search
from string import split
@@ -41,9 +41,8 @@
are automatically expanded.
"""
- def __init__(self, Parent, StatusName, Y, X, W, Sizes,
- **properties):
- apply (Control.__init__, (self, Parent, StatusName), properties)
+ def __init__(self, Parent, StatusName, Y, X, W, Sizes, **properties):
+ Control.__init__(self, Parent, StatusName, **properties)
self.PadHeight = 2 # pad the height by this much if multiline
self.PARENT = Parent
self.X = X
@@ -112,7 +111,7 @@
self.SetMethod("SYSGOTFOCUS", None)
self.SetMethod("SYSLOSTFOCUS", None)
- GDebug.printMesg(1,"X=%s,Y=%s,W=%s, Xs=%s, lenEmpty=%s, Sizes=%s" % \
+ gDebug(1,"X=%s,Y=%s,W=%s, Xs=%s, lenEmpty=%s, Sizes=%s" % \
(X, Y, W, self.FIELD_X, len(self._EmptyStatusBar),
Sizes))
Modified: trunk/gnue-common/src/cursing/TextArea.py
===================================================================
--- trunk/gnue-common/src/cursing/TextArea.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/TextArea.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import curses, string
import sio
@@ -40,7 +40,7 @@
"""
def __init__(self, Parent, TextboxName, Y, X, W, H, DefaultValue="",
Password=0,
**properties):
- apply(Control.__init__, (self, Parent, TextboxName), properties)
+ Control.__init__(self, Parent, TextboxName, **properties)
self.PARENT = Parent
self.CLASS = "TEXTBOX"
self.PASSWORD = Password
Modified: trunk/gnue-common/src/cursing/TextBox.py
===================================================================
--- trunk/gnue-common/src/cursing/TextBox.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/TextBox.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import curses, sio
from constants import *
@@ -39,7 +39,7 @@
"""
def __init__(self, Parent, TextboxName, Y, X, W, DefaultValue="", Password=0,
**properties):
- apply(Control.__init__, (self, Parent, TextboxName), properties)
+ Control.__init__(self, Parent, TextboxName, **properties)
self.PARENT = Parent
self.CLASS = "TEXTBOX"
self.PASSWORD = Password
Modified: trunk/gnue-common/src/cursing/VButton.py
===================================================================
--- trunk/gnue-common/src/cursing/VButton.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/VButton.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
from constants import *
from Button import Button
import sio
@@ -36,7 +36,7 @@
vertical-scrollbar buttons)
"""
def __init__(self, Parent, ButtonName,Y,X,H,Caption,**properties):
- apply(Button.__init__, (self, Parent, ButtonName, Y, X, H,
Caption),properties)
+ Button.__init__(self, Parent, ButtonName, Y, X, H, Caption,**properties)
self.W = 1
self.H = H
self.SetColor('SCROLL_BUTTON','SCROLL_BUTTON_FOCUS')
Modified: trunk/gnue-common/src/cursing/VScrollBar.py
===================================================================
--- trunk/gnue-common/src/cursing/VScrollBar.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/VScrollBar.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import math
import curses
import sio
@@ -39,7 +39,7 @@
"""
"""
def __init__(self, Parent, SBName, Y, X, H, **properties):
- apply(ScrollBar.__init__, (self, Parent, SBName, Y,X,1),properties)
+ ScrollBar.__init__(self, Parent, SBName, Y,X,1,**properties)
self.H = H
self.W = 1
self.Y = Y
Modified: trunk/gnue-common/src/cursing/constants.py
===================================================================
--- trunk/gnue-common/src/cursing/constants.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/constants.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,8 +26,8 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
#
# constants.py
#
Modified: trunk/gnue-common/src/cursing/sio.py
===================================================================
--- trunk/gnue-common/src/cursing/sio.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/sio.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,8 +26,8 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
#
# sio.py
#
@@ -88,20 +88,20 @@
def BeginScreenAccess(self):
"""Initialize the screen and setup for action."""
- GDebug.printMesg(0,'initializing curses screen')
+ gDebug(0,'initializing curses screen')
#if self.s <> None:
# return
- GDebug.printMesg(0,'initializing curses screen 1')
+ gDebug(0,'initializing curses screen 1')
self.stdscr = curses.initscr()
self._NegotiateScreenSize()
- GDebug.printMesg(0,'initializing curses screen 2')
+ gDebug(0,'initializing curses screen 2')
self.s = curses.newwin(self.MAXROW+1, self.MAXCOL+1, 0, 0)
curses.noecho()
- GDebug.printMesg(0,'initializing curses screen 3')
+ gDebug(0,'initializing curses screen 3')
#curses.nonl() # disallows usage of <CR> as a selector.
curses.cbreak()
self.s.keypad(1)
- GDebug.printMesg(0,'initializing curses screen 4')
+ gDebug(0,'initializing curses screen 4')
# make the cursor very visible
#curses.curs_set(2) # throws an ERR, removing.
@@ -119,7 +119,7 @@
tiLTEE : curses.ACS_LTEE,
tiRTEE : curses.ACS_RTEE,
tiBULL : curses.ACS_PLUS}
- GDebug.printMesg(0,'initializing curses screen 5')
+ gDebug(0,'initializing curses screen 5')
# TODO: should really only do this if configuration
# TODO: says yes, or on some other test.
@@ -128,7 +128,7 @@
import ColorScheme
if curses.has_colors():
- GDebug.printMesg(1,"Initializing StandardWhiteOnBlue colors")
+ gDebug(1,"Initializing StandardWhiteOnBlue colors")
self.colors = ColorScheme.StandardWhiteOnBlue()
# curses.init_pair(C_SCREEN, curses.COLOR_WHITE,curses.COLOR_BLUE)
@@ -151,7 +151,7 @@
## curses.init_pair(C_STATUSBAR, curses.COLOR_BLACK, curses.COLOR_WHITE)
## curses.init_pair(C_STATUSBAR_FIELD, curses.COLOR_BLUE,
curses.COLOR_WHITE)
else:
- GDebug.printMesg(1,"Initializing Monochrome colors")
+ gDebug(1,"Initializing Monochrome colors")
self.colors = ColorScheme.Monochrome()
Modified: trunk/gnue-common/src/cursing/utility.py
===================================================================
--- trunk/gnue-common/src/cursing/utility.py 2004-02-05 20:08:08 UTC (rev
5070)
+++ trunk/gnue-common/src/cursing/utility.py 2004-02-05 23:13:16 UTC (rev
5071)
@@ -26,7 +26,7 @@
# NOTES:
#
-from gnue.common.apps import GDebug
+
import curses
#
Modified: trunk/gnue-forms/src/uidrivers/curses/UIdriver.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/UIdriver.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/UIdriver.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -86,7 +86,7 @@
if self._disableSplash:
text = 'GNU Enterprise Forms\n' \
+ 'Version %s\n' % VERSION \
- + '(c)2000-2002 Free Software Foundation\n' \
+ + '(c)2000-2004 Free Software Foundation\n' \
+ 'Protected by GNU General Public Licence 2.0\n'
#MsgBoxOK(self.mainWindow, text).Show()
@@ -144,7 +144,8 @@
# fully activated
#
def mainLoop(self):
- self.mainWindow.Run()
+ self._children[0].mainWindow.Run()
+ pass
#
Modified: trunk/gnue-forms/src/uidrivers/curses/__init__.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/__init__.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/__init__.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -1,3 +1,35 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# __init__.py
+#
+# DESCRIPTION:
+"""
+ A curses based user interface driver for GNUe forms.
+"""
+#
+# NOTES:
+#
+
+
from UIdriver import GFUserInterface
from UILoginHandler import *
Modified: trunk/gnue-forms/src/uidrivers/curses/common.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/common.py 2004-02-05 20:08:08 UTC
(rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/common.py 2004-02-05 23:13:16 UTC
(rev 5071)
@@ -136,14 +136,14 @@
##object = _eventObjTowxWindow(event)
- GDebug.printMesg(0,"key====== %s" % keystroke)
+ gDebug(0,"key====== %s" % keystroke)
command = GFKeyMapper.KeyMapper.getEvent(
keystroke,
0, #event.ShiftDown(),
0, #event.ControlDown(),
0) #event.AltDown())
- GDebug.printMesg(0,"========= %s" % command)
+ gDebug(0,"========= %s" % command)
# TODO : Broken for the moment, this should probably be form driven
#if command == 'JUMPRECORD':
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/_base.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/_base.py 2004-02-05
20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/_base.py 2004-02-05
23:13:16 UTC (rev 5071)
@@ -49,9 +49,9 @@
GDebug.printMesg(0, "Widget list %s" % self.widgets)
GDebug.printMesg(0, "Index %s" % index)
widget = self.widgets[index]
- widget.PARENT.SetFocus(widget,run=0)
+ widget.PARENT.SetFocus(widget,run=False)
- def setValue(self, value, index=0, enabled=1):
+ def setValue(self, value, index=0, enabled=True):
self.widgets[index].SetValue(value)
def setCursorPosition(self, position, index=0):
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/box.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/box.py 2004-02-05
20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/box.py 2004-02-05
23:13:16 UTC (rev 5071)
@@ -39,8 +39,9 @@
class UIBox(UIHelper):
def _createWidget(self, event, spacer):
object = event.object
- newWidget = GroupBox(event.container,'name',object.Char__y,object.Char__x,
- object.Char__width,
object.Char__height,str(object.label))
+ newWidget =
GroupBox(event.container,'name',object["Char:y"],object["Char:x"],
+ object["Char:width"],
object["Char:height"],str(object.label))
+ gDebug(0,'****PARENT: %s' % object)
event.container.AddControl(newWidget)
return newWidget
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/button.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/button.py 2004-02-05
20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/button.py 2004-02-05
23:13:16 UTC (rev 5071)
@@ -41,7 +41,7 @@
class UIButton(UIHelper):
def _createWidget(self, event, spacer):
object = event.object
- newWidget =
Button(event.container,'name',object.Char__y+spacer,object.Char__x,object.Char__width,str(object.label))
+ newWidget =
Button(event.container,'name',object["Char:y"]+spacer,object["Char:x"],object["Char:width"],str(object.label))
event.container.AddControl(newWidget)
self.__gf = object
newWidget.SetMethod("CLICK", self.buttonHandler)
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/entry.py 2004-02-05
20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/entry.py 2004-02-05
23:13:16 UTC (rev 5071)
@@ -46,17 +46,17 @@
choices = object._field.allowedValues()[1]
else:
choices = [""]
- newWidget = ComboBox(event.container,
'name',object.Char__y+spacer,object.Char__x, object.Char__width)
+ newWidget = ComboBox(event.container,
'name',object["Char:y"]+spacer,object["Char:x"], object["Char:width"])
for index in range(len(choices)):
newWidget.AddItem(index,choices[index])
elif style == 'label':
- newWidget = TextBox(event.container, 'name', object.Char__y+spacer,
object.Char__x, object.Char__width)
+ newWidget = TextBox(event.container, 'name', object["Char:y"]+spacer,
object["Char:x"], object["Char:width"])
elif style == 'checkbox':
- newWidget = CheckBox(event.container,
'name',object.Char__y+spacer,object.Char__x,'',0)
- elif hasattr(object,'Char__height') and object.Char__height > 1: # Normal
text box/Multiline
- newWidget = TextArea(event.container, 'name', object.Char__y+spacer,
object.Char__x, object.Char__width, object.Char__height)
+ newWidget = CheckBox(event.container,
'name',object["Char:y"]+spacer,object["Char:x"],'',0)
+ elif hasattr(object,'["Char:height"]') and object["Char:height"] > 1: #
Normal text box/Multiline
+ newWidget = TextArea(event.container, 'name', object["Char:y"]+spacer,
object["Char:x"], object["Char:width"], object["Char:height"])
else: # Normal text box
- newWidget = TextBox(event.container, 'name', object.Char__y+spacer,
object.Char__x, object.Char__width)
+ newWidget = TextBox(event.container, 'name', object["Char:y"]+spacer,
object["Char:x"], object["Char:width"])
event.container.AddControl(newWidget)
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/form/widget.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/form/widget.py
2004-02-05 20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/form/widget.py
2004-02-05 23:13:16 UTC (rev 5071)
@@ -49,7 +49,7 @@
def _createWidget(self, event, spacer):
object = event.object
- print "OBJECT", object
+ gDebug(0, "OBJECT %s"% object)
#import sys
#sys.exit()
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/form/wrappers.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/form/wrappers.py
2004-02-05 20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/form/wrappers.py
2004-02-05 23:13:16 UTC (rev 5071)
@@ -39,8 +39,8 @@
self.form = form = uiform._form
self.margin = 6
- self._formWidth = formWidth = int(form._layout.Char__width)
- self._formHeight = formHeight = int(form._layout.Char__height)
+ self._formWidth = formWidth = int(form._layout["Char:width"])
+ self._formHeight = formHeight = int(form._layout["Char:height"])
x = y = 0
Frame.__init__(self, frame, y, x, formHeight, formWidth)
##wxScrolledWindow.__init__(self, frame, -1)
@@ -180,8 +180,8 @@
## self.pane = wxPanel(self.spacerpane, -1, size=self.layoutSize,
pos=wxPoint(self.margin, self.margin))
def createPage(self, object):
- x = y = 0
- newWidget = Frame(self.pane,y, x, self._formHeight, self._formWidth)
+ x = y = 1
+ newWidget = Frame(self.pane,y, x, self._formHeight, self._formWidth,
border=0, dropshadow=0)
## newWidget = wxPanel(self.pane, -1, size=self.layoutSize)
# Only show first page
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/label.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/label.py 2004-02-05
20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/label.py 2004-02-05
23:13:16 UTC (rev 5071)
@@ -45,8 +45,10 @@
def _createWidget(self, event, spacer):
object = event.object
style = self.alignmentStyle[object.alignment]
- GDebug.printMesg(0,"*****Label Alert!!! (x,y)=(%s,%s) %s" %
(object.Char__x, object.Char__y,event.container))
- newWidget =
Label(event.container,str(self),object.Char__y+spacer,object.Char__x,str(object.text))
+ gDebug(0,"*****Label Alert!!! (x,y)=(%s,%s) %s" % (object["Char:x"],
+ object["Char:y"],event.container))
+ newWidget = Label(event.container,str(self),object["Char:y"]+spacer,
+ object["Char:x"],str(object.text))
event.container.AddControl(newWidget)
return newWidget
Modified: trunk/gnue-forms/src/uidrivers/curses/widgets/scrollbar.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/curses/widgets/scrollbar.py 2004-02-05
20:08:08 UTC (rev 5070)
+++ trunk/gnue-forms/src/uidrivers/curses/widgets/scrollbar.py 2004-02-05
23:13:16 UTC (rev 5071)
@@ -41,10 +41,12 @@
def _createWidget(self, event, spacer):
object = event.object
- if object.Char__width > 1:
- newWidget =
ScrollBar(event.container,'name',object.Char__y,object.Char__x,object.Char__width)
+ if object["Char:width"] > 1:
+ newWidget = ScrollBar(event.container,'name',object['Char:y'],
+ object['Char:x'],object['Char:width'])
else:
- newWidget =
VScrollBar(event.container,'name',object.Char__y,object.Char__x,object.Char__height)
+ newWidget = VScrollBar(event.container,'name',object['Char:y'],
+ object['Char:x'],object['Char:width'])
event.container.AddControl(newWidget)
newWidget.Init(10) ## TODO: This should be the number of rows
return newWidget
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r5071 - in trunk: gnue-common/src/cursing gnue-forms/src/uidrivers/curses gnue-forms/src/uidrivers/curses/widgets gnue-forms/src/uidrivers/curses/widgets/form,
jcater <=