| 216 |
|
###---------------------------------------------------------------------------
|
| 217 |
|
### Just A Dialog To Select Pen Styles
|
| 218 |
|
###---------------------------------------------------------------------------
|
| 219 |
|
##class PenDialog(wx.Dialog):
|
| 220 |
|
##
|
| 221 |
|
## def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
| 222 |
|
## size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE, oldpen=None,
|
| 223 |
|
## pentype=0):
|
| 224 |
|
##
|
| 225 |
|
## wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
| 226 |
|
##
|
| 227 |
|
## self.colourbutton = csel.ColourSelect(self)
|
| 228 |
|
## self.spinwidth = wx.SpinCtrl(self, -1, "1", min=1, max=3, style=wx.SP_ARROW_KEYS)
|
| 229 |
|
##
|
| 230 |
|
## self.combostyle = wx.ComboBox(self, -1, choices=penstyle, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
| 231 |
|
##
|
| 232 |
|
## choices = ["[1, 1]", "[2, 2]", "[3, 3]", "[4, 4]"]
|
| 233 |
|
## self.combodash = wx.ComboBox(self, -1, choices=choices, style=wx.CB_DROPDOWN|wx.CB_READONLY)
|
| 234 |
|
##
|
| 235 |
|
## self.okbutton = wx.Button(self, wx.ID_OK)
|
| 236 |
|
## self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
| 237 |
|
##
|
| 238 |
|
## self.oldpen = oldpen
|
| 239 |
|
## self.parent = parent
|
| 240 |
|
## self.pentype = pentype
|
| 241 |
|
##
|
| 242 |
|
## self.__set_properties()
|
| 243 |
|
## self.__do_layout()
|
| 244 |
|
##
|
| 245 |
|
## self.Bind(wx.EVT_COMBOBOX, self.OnStyle, self.combostyle)
|
| 246 |
|
## self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
| 247 |
|
## self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
| 248 |
|
##
|
| 249 |
|
##
|
| 250 |
|
## def __set_properties(self):
|
| 251 |
|
##
|
| 252 |
|
## self.SetTitle("Pen Dialog Selector")
|
| 253 |
|
## self.colourbutton.SetMinSize((25, 25))
|
| 254 |
|
## self.colourbutton.SetColour(self.oldpen.GetColour())
|
| 255 |
|
##
|
| 256 |
|
## style = self.oldpen.GetStyle()
|
| 257 |
|
## for count, st in enumerate(penstyle):
|
| 258 |
|
## if eval(st) == style:
|
| 259 |
|
## self.combostyle.SetSelection(count)
|
| 260 |
|
## if count == 5:
|
| 261 |
|
## self.combodash.Enable(True)
|
| 262 |
|
## else:
|
| 263 |
|
## self.combodash.Enable(False)
|
| 264 |
|
## break
|
| 265 |
|
##
|
| 266 |
|
## if self.combodash.IsEnabled():
|
| 267 |
|
## dashes = repr(self.oldpen.GetDashes())
|
| 268 |
|
## self.combodash.SetValue(dashes)
|
| 269 |
|
##
|
| 270 |
|
## self.spinwidth.SetValue(self.oldpen.GetWidth())
|
| 271 |
|
## self.okbutton.SetDefault()
|
| 272 |
|
##
|
| 273 |
|
## if self.pentype == 1:
|
| 274 |
|
## self.spinwidth.Enable(False)
|
| 275 |
|
##
|
| 276 |
|
##
|
| 277 |
|
## def __do_layout(self):
|
| 278 |
|
##
|
| 279 |
|
## mainsizer = wx.BoxSizer(wx.VERTICAL)
|
| 280 |
|
## bottomsizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 281 |
|
## middlesizer = wx.BoxSizer(wx.VERTICAL)
|
| 282 |
|
## stylesizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 283 |
|
## widthsizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 284 |
|
## coloursizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 285 |
|
## label_1 = wx.StaticText(self, -1, "Please Choose The Pen Settings:")
|
| 286 |
|
## label_1.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
|
| 287 |
|
## mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
| 288 |
|
## label_2 = wx.StaticText(self, -1, "Pen Colour")
|
| 289 |
|
## coloursizer.Add(label_2, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
| 290 |
|
## coloursizer.Add((5, 5), 1, wx.ADJUST_MINSIZE, 0)
|
| 291 |
|
## coloursizer.Add(self.colourbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 5)
|
| 292 |
|
## middlesizer.Add(coloursizer, 0, wx.EXPAND, 0)
|
| 293 |
|
## label_3 = wx.StaticText(self, -1, "Pen Width")
|
| 294 |
|
## widthsizer.Add(label_3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
| 295 |
|
## widthsizer.Add((5, 5), 1, wx.ADJUST_MINSIZE, 0)
|
| 296 |
|
## widthsizer.Add(self.spinwidth, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
| 297 |
|
## middlesizer.Add(widthsizer, 0, wx.EXPAND, 0)
|
| 298 |
|
## label_4 = wx.StaticText(self, -1, "Pen Style")
|
| 299 |
|
## stylesizer.Add(label_4, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
| 300 |
|
## stylesizer.Add((5, 5), 1, wx.ADJUST_MINSIZE, 0)
|
| 301 |
|
## stylesizer.Add(self.combostyle, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
| 302 |
|
## stylesizer.Add(self.combodash, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 5)
|
| 303 |
|
## middlesizer.Add(stylesizer, 0, wx.BOTTOM|wx.EXPAND, 5)
|
| 304 |
|
## mainsizer.Add(middlesizer, 1, wx.EXPAND, 0)
|
| 305 |
|
## bottomsizer.Add(self.okbutton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 20)
|
| 306 |
|
## bottomsizer.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 307 |
|
## bottomsizer.Add(self.cancelbutton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 20)
|
| 308 |
|
## mainsizer.Add(bottomsizer, 0, wx.EXPAND, 0)
|
| 309 |
|
## self.SetAutoLayout(True)
|
| 310 |
|
## self.SetSizer(mainsizer)
|
| 311 |
|
## mainsizer.Fit(self)
|
| 312 |
|
## mainsizer.SetSizeHints(self)
|
| 313 |
|
## self.Layout()
|
| 314 |
|
## self.Centre()
|
| 315 |
|
##
|
| 316 |
|
##
|
| 317 |
|
##
|
| 318 |
|
##
|
| 319 |
|
## def OnStyle(self, event):
|
| 320 |
|
##
|
| 321 |
|
## choice = event.GetEventObject().GetValue()
|
| 322 |
|
## self.combodash.Enable(choice==5)
|
| 323 |
|
## event.Skip()
|
| 324 |
|
##
|
| 325 |
|
##
|
| 326 |
|
## def OnOk(self, event):
|
| 327 |
|
##
|
| 328 |
|
## colour = self.colourbutton.GetColour()
|
| 329 |
|
## style = eval(self.combostyle.GetValue())
|
| 330 |
|
## width = int(self.spinwidth.GetValue())
|
| 331 |
|
##
|
| 332 |
|
## dashes = None
|
| 333 |
|
## if self.combostyle.GetSelection() == 5:
|
| 334 |
|
## dashes = eval(self.combodash.GetValue())
|
| 335 |
|
##
|
| 336 |
|
## pen = wx.Pen(colour, width, style)
|
| 337 |
|
##
|
| 338 |
|
## if dashes:
|
| 339 |
|
## pen.SetDashes(dashes)
|
| 340 |
|
##
|
| 341 |
|
## pen.SetCap(wx.CAP_BUTT)
|
| 342 |
|
##
|
| 343 |
|
## if self.pentype == 0:
|
| 344 |
|
## self.parent.SetConnectionPen(pen)
|
| 345 |
|
## else:
|
| 346 |
|
## self.parent.SetBorderPen(pen)
|
| 347 |
|
##
|
| 348 |
|
## self.Destroy()
|
| 349 |
|
## event.Skip()
|
| 350 |
|
##
|
| 351 |
|
##
|
| 352 |
|
## def OnCancel(self, event):
|
| 353 |
|
##
|
| 354 |
|
## self.Destroy()
|
| 355 |
|
## event.Skip()
|
| 356 |
|
|
| 357 |
|
|
| 358 |
|
###---------------------------------------------------------------------------
|
| 359 |
|
### Just A Dialog To Select Tree Buttons Icons
|
| 360 |
|
###---------------------------------------------------------------------------
|
| 361 |
|
##class TreeButtonsDialog(wx.Dialog):
|
| 362 |
|
##
|
| 363 |
|
## def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
| 364 |
|
## size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE, oldicons=None):
|
| 365 |
|
##
|
| 366 |
|
## wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
| 367 |
|
##
|
| 368 |
|
## self.listicons = wx.ListBox(self, -1, choices=["Set 1", "Set 2", "Set 3", "Set 4", "Set 5"], style=wx.LB_SINGLE)
|
| 369 |
|
##
|
| 370 |
|
## bitmap_plus = opj("bitmaps/plus" + str(oldicons+1) + ".ico")
|
| 371 |
|
## bitmap_minus = opj("bitmaps/minus" + str(oldicons+1) + ".ico")
|
| 372 |
|
##
|
| 373 |
|
## bitmap_plus = wx.Image(bitmap_plus, wx.BITMAP_TYPE_ICO)
|
| 374 |
|
## bitmap_plus.Rescale(24, 24)
|
| 375 |
|
## bitmap_plus = bitmap_plus.ConvertToBitmap()
|
| 376 |
|
## bitmap_minus = wx.Image(bitmap_minus, wx.BITMAP_TYPE_ICO)
|
| 377 |
|
## bitmap_minus.Rescale(24, 24)
|
| 378 |
|
## bitmap_minus = bitmap_minus.ConvertToBitmap()
|
| 379 |
|
##
|
| 380 |
|
## self.bitmap_plus = wx.StaticBitmap(self, -1, bitmap_plus)
|
| 381 |
|
## self.bitmap_minus = wx.StaticBitmap(self, -1, bitmap_minus)
|
| 382 |
|
##
|
| 383 |
|
## self.okbutton = wx.Button(self, wx.ID_OK)
|
| 384 |
|
## self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
| 385 |
|
##
|
| 386 |
|
## self.parent = parent
|
| 387 |
|
##
|
| 388 |
|
## self.__set_properties()
|
| 389 |
|
## self.__do_layout()
|
| 390 |
|
##
|
| 391 |
|
## self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
| 392 |
|
## self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
| 393 |
|
## self.Bind(wx.EVT_LISTBOX, self.OnListBox, self.listicons)
|
| 394 |
|
##
|
| 395 |
|
##
|
| 396 |
|
## def __set_properties(self):
|
| 397 |
|
##
|
| 398 |
|
## self.SetTitle("Tree Buttons Selector")
|
| 399 |
|
## self.listicons.SetSelection(0)
|
| 400 |
|
## self.okbutton.SetDefault()
|
| 401 |
|
##
|
| 402 |
|
##
|
| 403 |
|
## def __do_layout(self):
|
| 404 |
|
##
|
| 405 |
|
## mainsizer = wx.BoxSizer(wx.VERTICAL)
|
| 406 |
|
## bottomsizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 407 |
|
## topsizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 408 |
|
## rightsizer = wx.BoxSizer(wx.VERTICAL)
|
| 409 |
|
## sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
| 410 |
|
## sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
|
| 411 |
|
## label_1 = wx.StaticText(self, -1, "Please Choose One Of These Sets Of Icons:")
|
| 412 |
|
## label_1.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
|
| 413 |
|
## mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
| 414 |
|
## topsizer.Add(self.listicons, 0, wx.ALL|wx.EXPAND|wx.ADJUST_MINSIZE, 5)
|
| 415 |
|
## label_2 = wx.StaticText(self, -1, "Collapsed")
|
| 416 |
|
## sizer_1.Add(label_2, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 417 |
|
## sizer_1.Add((20, 20), 1, wx.ALIGN_RIGHT|wx.ADJUST_MINSIZE, 0)
|
| 418 |
|
## sizer_1.Add(self.bitmap_plus, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 419 |
|
## rightsizer.Add(sizer_1, 0, wx.EXPAND, 0)
|
| 420 |
|
## label_3 = wx.StaticText(self, -1, "Expanded")
|
| 421 |
|
## sizer_2.Add(label_3, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 422 |
|
## sizer_2.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 423 |
|
## sizer_2.Add(self.bitmap_minus, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 424 |
|
## rightsizer.Add(sizer_2, 0, wx.EXPAND, 0)
|
| 425 |
|
## topsizer.Add(rightsizer, 0, wx.ALL|wx.EXPAND, 5)
|
| 426 |
|
## mainsizer.Add(topsizer, 1, wx.EXPAND, 0)
|
| 427 |
|
## bottomsizer.Add(self.okbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
| 428 |
|
## bottomsizer.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 429 |
|
## bottomsizer.Add(self.cancelbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
| 430 |
|
## mainsizer.Add(bottomsizer, 0, wx.EXPAND, 0)
|
| 431 |
|
## self.SetAutoLayout(True)
|
| 432 |
|
## self.SetSizer(mainsizer)
|
| 433 |
|
## mainsizer.Fit(self)
|
| 434 |
|
## mainsizer.SetSizeHints(self)
|
| 435 |
|
## self.Layout()
|
| 436 |
|
##
|
| 437 |
|
##
|
| 438 |
|
## def OnListBox(self, event):
|
| 439 |
|
##
|
| 440 |
|
## selection = self.listicons.GetSelection()
|
| 441 |
|
## bitmap_plus = opj("bitmaps/plus" + str(selection+1) + ".ico")
|
| 442 |
|
## bitmap_minus = opj("bitmaps/minus" + str(selection+1) + ".ico")
|
| 443 |
|
##
|
| 444 |
|
## bitmap_plus = wx.Image(bitmap_plus, wx.BITMAP_TYPE_ICO)
|
| 445 |
|
## bitmap_plus.Rescale(24, 24)
|
| 446 |
|
## bitmap_plus = bitmap_plus.ConvertToBitmap()
|
| 447 |
|
## bitmap_minus = wx.Image(bitmap_minus, wx.BITMAP_TYPE_ICO)
|
| 448 |
|
## bitmap_minus.Rescale(24, 24)
|
| 449 |
|
## bitmap_minus = bitmap_minus.ConvertToBitmap()
|
| 450 |
|
##
|
| 451 |
|
## self.bitmap_plus.SetBitmap(bitmap_plus)
|
| 452 |
|
## self.bitmap_minus.SetBitmap(bitmap_minus)
|
| 453 |
|
##
|
| 454 |
|
## self.bitmap_plus.Refresh()
|
| 455 |
|
## self.bitmap_minus.Refresh()
|
| 456 |
|
## event.Skip()
|
| 457 |
|
##
|
| 458 |
|
##
|
| 459 |
|
## def OnOk(self, event):
|
| 460 |
|
##
|
| 461 |
|
## selection = self.listicons.GetSelection()
|
| 462 |
|
## self.parent.SetTreeButtons(selection)
|
| 463 |
|
## self.Destroy()
|
| 464 |
|
## event.Skip()
|
| 465 |
|
##
|
| 466 |
|
##
|
| 467 |
|
## def OnCancel(self, event):
|
| 468 |
|
##
|
| 469 |
|
## self.Destroy()
|
| 470 |
|
## event.Skip()
|
| 471 |
|
|
| 472 |
|
|
| 473 |
|
###---------------------------------------------------------------------------
|
| 474 |
|
### Just A Dialog To Select Tree Check/Radio Item Icons
|
| 475 |
|
###---------------------------------------------------------------------------
|
| 476 |
|
##class CheckDialog(wx.Dialog):
|
| 477 |
|
##
|
| 478 |
|
## def __init__(self, parent=None, id=-1, title="", pos=wx.DefaultPosition,
|
| 479 |
|
## size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE):
|
| 480 |
|
##
|
| 481 |
|
## wx.Dialog.__init__(self, parent, id, title, pos, size, style)
|
| 482 |
|
##
|
| 483 |
|
## self.listicons = wx.ListBox(self, -1, choices=["Set 1", "Set 2"], style=wx.LB_SINGLE)
|
| 484 |
|
##
|
| 485 |
|
## bitmap_check = wx.Bitmap(opj("bitmaps/checked.ico"), wx.BITMAP_TYPE_ICO)
|
| 486 |
|
## bitmap_uncheck = wx.Bitmap(opj("bitmaps/notchecked.ico"), wx.BITMAP_TYPE_ICO)
|
| 487 |
|
## bitmap_flag = wx.Bitmap(opj("bitmaps/flagged.ico"), wx.BITMAP_TYPE_ICO)
|
| 488 |
|
## bitmap_unflag = wx.Bitmap(opj("bitmaps/notflagged.ico"), wx.BITMAP_TYPE_ICO)
|
| 489 |
|
##
|
| 490 |
|
## self.bitmap_check = wx.StaticBitmap(self, -1, bitmap_check)
|
| 491 |
|
## self.bitmap_uncheck = wx.StaticBitmap(self, -1, bitmap_uncheck)
|
| 492 |
|
## self.bitmap_flag = wx.StaticBitmap(self, -1, bitmap_flag)
|
| 493 |
|
## self.bitmap_unflag = wx.StaticBitmap(self, -1, bitmap_unflag)
|
| 494 |
|
##
|
| 495 |
|
## self.okbutton = wx.Button(self, wx.ID_OK)
|
| 496 |
|
## self.cancelbutton = wx.Button(self, wx.ID_CANCEL)
|
| 497 |
|
##
|
| 498 |
|
## self.parent = parent
|
| 499 |
|
##
|
| 500 |
|
## self.__set_properties()
|
| 501 |
|
## self.__do_layout()
|
| 502 |
|
##
|
| 503 |
|
## self.Bind(wx.EVT_BUTTON, self.OnOk, self.okbutton)
|
| 504 |
|
## self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancelbutton)
|
| 505 |
|
## self.Bind(wx.EVT_LISTBOX, self.OnListBox, self.listicons)
|
| 506 |
|
##
|
| 507 |
|
##
|
| 508 |
|
## def __set_properties(self):
|
| 509 |
|
##
|
| 510 |
|
## self.SetTitle("Check/Radio Icon Selector")
|
| 511 |
|
## self.listicons.SetSelection(0)
|
| 512 |
|
## self.okbutton.SetDefault()
|
| 513 |
|
##
|
| 514 |
|
##
|
| 515 |
|
## def __do_layout(self):
|
| 516 |
|
##
|
| 517 |
|
## mainsizer = wx.BoxSizer(wx.VERTICAL)
|
| 518 |
|
## bottomsizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 519 |
|
## topsizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 520 |
|
## rightsizer = wx.BoxSizer(wx.VERTICAL)
|
| 521 |
|
## sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
| 522 |
|
## sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
|
| 523 |
|
## sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
|
| 524 |
|
## sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
|
| 525 |
|
## label_1 = wx.StaticText(self, -1, "Please Choose One Of These Sets Of Icons:")
|
| 526 |
|
## label_1.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
|
| 527 |
|
## mainsizer.Add(label_1, 0, wx.ALL|wx.ADJUST_MINSIZE, 10)
|
| 528 |
|
## topsizer.Add(self.listicons, 0, wx.ALL|wx.EXPAND|wx.ADJUST_MINSIZE, 5)
|
| 529 |
|
## label_2 = wx.StaticText(self, -1, "Checked")
|
| 530 |
|
## sizer_1.Add(label_2, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 531 |
|
## sizer_1.Add((20, 20), 1, wx.ALIGN_RIGHT|wx.ADJUST_MINSIZE, 0)
|
| 532 |
|
## sizer_1.Add(self.bitmap_check, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 533 |
|
## rightsizer.Add(sizer_1, 0, wx.EXPAND, 0)
|
| 534 |
|
## label_3 = wx.StaticText(self, -1, "Not Checked")
|
| 535 |
|
## sizer_2.Add(label_3, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 536 |
|
## sizer_2.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 537 |
|
## sizer_2.Add(self.bitmap_uncheck, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 538 |
|
## rightsizer.Add(sizer_2, 0, wx.EXPAND, 0)
|
| 539 |
|
## label_4 = wx.StaticText(self, -1, "Flagged")
|
| 540 |
|
## sizer_3.Add(label_4, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 541 |
|
## sizer_3.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 542 |
|
## sizer_3.Add(self.bitmap_flag, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 543 |
|
## rightsizer.Add(sizer_3, 0, wx.EXPAND, 0)
|
| 544 |
|
## label_5 = wx.StaticText(self, -1, "Not Flagged")
|
| 545 |
|
## sizer_4.Add(label_5, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 546 |
|
## sizer_4.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 547 |
|
## sizer_4.Add(self.bitmap_unflag, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 10)
|
| 548 |
|
## rightsizer.Add(sizer_4, 0, wx.EXPAND, 0)
|
| 549 |
|
##
|
| 550 |
|
## topsizer.Add(rightsizer, 0, wx.ALL|wx.EXPAND, 5)
|
| 551 |
|
## mainsizer.Add(topsizer, 1, wx.EXPAND, 0)
|
| 552 |
|
## bottomsizer.Add(self.okbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
| 553 |
|
## bottomsizer.Add((20, 20), 1, wx.ADJUST_MINSIZE, 0)
|
| 554 |
|
## bottomsizer.Add(self.cancelbutton, 0, wx.ALL|wx.ADJUST_MINSIZE, 20)
|
| 555 |
|
## mainsizer.Add(bottomsizer, 0, wx.EXPAND, 0)
|
| 556 |
|
## self.SetAutoLayout(True)
|
| 557 |
|
## self.SetSizer(mainsizer)
|
| 558 |
|
## mainsizer.Fit(self)
|
| 559 |
|
## mainsizer.SetSizeHints(self)
|
| 560 |
|
## self.Layout()
|
| 561 |
|
##
|
| 562 |
|
##
|
| 563 |
|
## def OnListBox(self, event):
|
| 564 |
|
##
|
| 565 |
|
## selection = self.listicons.GetSelection()
|
| 566 |
|
##
|
| 567 |
|
## if selection == 0:
|
| 568 |
|
## bitmap_check = opj("bitmaps/checked.ico")
|
| 569 |
|
## bitmap_uncheck = opj("bitmaps/notchecked.ico")
|
| 570 |
|
## bitmap_flag = opj("bitmaps/flagged.ico")
|
| 571 |
|
## bitmap_unflag = opj("bitmaps/notflagged.ico")
|
| 572 |
|
## else:
|
| 573 |
|
## bitmap_check = opj("bitmaps/aquachecked.ico")
|
| 574 |
|
## bitmap_uncheck = opj("bitmaps/aquanotchecked.ico")
|
| 575 |
|
## bitmap_flag = opj("bitmaps/aquaflagged.ico")
|
| 576 |
|
## bitmap_unflag = opj("bitmaps/aquanotflagged.ico")
|
| 577 |
|
##
|
| 578 |
|
## bitmap_check = wx.Bitmap(bitmap_check, wx.BITMAP_TYPE_ICO)
|
| 579 |
|
## bitmap_uncheck = wx.Bitmap(bitmap_uncheck, wx.BITMAP_TYPE_ICO)
|
| 580 |
|
## bitmap_flag = wx.Bitmap(bitmap_flag, wx.BITMAP_TYPE_ICO)
|
| 581 |
|
## bitmap_unflag = wx.Bitmap(bitmap_unflag, wx.BITMAP_TYPE_ICO)
|
| 582 |
|
##
|
| 583 |
|
## self.bitmap_uncheck.SetBitmap(bitmap_uncheck)
|
| 584 |
|
## self.bitmap_check.SetBitmap(bitmap_check)
|
| 585 |
|
## self.bitmap_unflag.SetBitmap(bitmap_unflag)
|
| 586 |
|
## self.bitmap_flag.SetBitmap(bitmap_flag)
|
| 587 |
|
##
|
| 588 |
|
## self.bitmap_check.Refresh()
|
| 589 |
|
## self.bitmap_uncheck.Refresh()
|
| 590 |
|
## self.bitmap_flag.Refresh()
|
| 591 |
|
## self.bitmap_unflag.Refresh()
|
| 592 |
|
##
|
| 593 |
|
## event.Skip()
|
| 594 |
|
##
|
| 595 |
|
##
|
| 596 |
|
## def OnOk(self, event):
|
| 597 |
|
##
|
| 598 |
|
## selection = self.listicons.GetSelection()
|
| 599 |
|
## self.parent.SetCheckRadio(selection)
|
| 600 |
|
## self.Destroy()
|
| 601 |
|
## event.Skip()
|
| 602 |
|
##
|
| 603 |
|
##
|
| 604 |
|
## def OnCancel(self, event):
|
| 605 |
|
##
|
| 606 |
|
## self.Destroy()
|
| 607 |
|
## event.Skip()
|
| 608 |
|
|
| 609 |
|
|