Beispiel #1
0
 def __init__(self,content=None,hPolicy=SHOW_AUTO,vPolicy=SHOW_AUTO):
     BasicContainer.__init__(self)
     
     self.mVScroll=0
     self.mHScroll=0
     self.mHPolicy=hPolicy
     self.mVPolicy=vPolicy
     self.mScrollbarWidth=12
     self.mUpButtonPressed=False
     self.mDownButtonPressed=False
     self.mLeftButtonPressed=False
     self.mRightButtonPressed=False
     self.mIsVerticalMarkerDragged=False
     self.mIsHorizontalMarkerDragged=False
     self.mUpButtonScrollAmount=10
     self.mDownButtonScrollAmount=10
     self.mLeftButtonScrollAmount=10
     self.mRightButtonScrollAmount=10
     self.mHorizontalMarkerDragOffset=0
     self.mVerticalMarkerDragOffset=0
     self.mVBarVisible=False
     self.mHBarVisible=False
     self.mOpaque=True
     self.mContent=None
     
     self.setContent(content)
     self.addMouseListener(self)
Beispiel #2
0
 def showWidgetPart(self, widget, area):
     if widget != self.getContent():
         raise GCN_EXCEPTION("Widget not content widget")
         
     BasicContainer.showWidgetPart(self, widget, area)
     
     self.setHorizontalScrollAmount(self.getContent().getFrameSize()-self.getContent().getX())
     self.setVerticalScrollAmount(self.getContent().getFrameSize()-self.getContent().getY())
Beispiel #3
0
 def __init__(self,caption=""):
     BasicContainer.__init__(self)
     self.mHasMouse=False
     self.mTabbedArea=None
     self.mLabel=Label()
     self.mLabel.setPosition(4,4)
     self.setCaption(caption)
     self.add(self.mLabel)
     
     self.addMouseListener(self)
     self.addFocusListener(self)
Beispiel #4
0
 def __init__(self):
     BasicContainer.__init__(self)
     self.mSelectedTab=None
     self.mTabs=[]
     self.setFocusable(True)
     self.addKeyListener(self)
     self.addMouseListener(self)
     self.addFocusListener(self)
     
     self.mTabContainer=Container()
     self.mTabContainer.setOpaque(False)
     self.mWidgetContainer=Container()
     
     self.add(self.mTabContainer)
     self.add(self.mWidgetContainer)
Beispiel #5
0
 def __init__(self):
     BasicContainer.__init__(self)
     self.mOpaque=True
Beispiel #6
0
 def add(self,widget,x=-1,y=-1):
     if x == -1 or y == -1:
         BasicContainer.add(self,widget)
     else:
         widget.setPosition(x,y)
         BasicContainer.add(self,widget)
Beispiel #7
0
 def __del__(self):
     BasicContainer.__del__(self)
Beispiel #8
0
 def death(self,event):
     tab=event.getSource()
     if isinstance(tab,Tab):
         self.removeTab(tab)
     else:
         BasicContainer.death(self,event)
Beispiel #9
0
 def logic(self):
     BasicContainer.logic(self)