Exemple #1
0
 def __init__(self, parent_mode, title, message):
     self.message = message
     self.width= int(parent_mode.cols/2)
     lns = format_utils.wrap_string(self.message,self.width-2,3,True)
     hr = min(len(lns)+2,int(parent_mode.rows/2))
     Popup.__init__(self,parent_mode,title,height_req=hr)
     self._lines = lns
Exemple #2
0
 def __init__(self, parent_mode, title, message, align=ALIGN.DEFAULT, width_req=0.5):
     self.message = message
     #self.width= int(parent_mode.cols/2)
     Popup.__init__(self,parent_mode, title, align=align, width_req=width_req)
     lns = format_utils.wrap_string(self.message,self.width-2,3,True)
     self.height_req = min(len(lns)+2,int(parent_mode.rows*2/3))
     self.handle_resize()
     self._lines = lns
Exemple #3
0
 def __split_help(self):
     self.__help_lines = format_utils.wrap_string(HELP_STR,(self.cols/2)-2)
Exemple #4
0
 def __split_help(self):
     self.__help_lines = format_utils.wrap_string(HELP_STR,(self.cols/2)-2)
Exemple #5
0
 def handle_resize(self):
     Popup.handle_resize(self)
     self.clear()
     self._lines = format_utils.wrap_string(self.message,self.width-2,3,True)