Module: VRCommonDialog

Included in:
VRForm
Defined in:
lib/vr/vruby.rb

Constant Summary collapse

DEFAULTFONT =
[["System",19,0,300,135,0,0,2,128],135,0]

Instance Method Summary collapse

Instance Method Details

#chooseColorDialog(*arg) ⇒ Object



690
691
692
# File 'lib/vr/vruby.rb', line 690

def chooseColorDialog(*arg)
  SWin::CommonDialog::chooseColor(self, *arg)
end

#chooseFontDialog(defaultvalue = nil) ⇒ Object



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/vr/vruby.rb', line 695

def chooseFontDialog(defaultvalue=nil)
  sarg = if defaultvalue.is_a?(FontStruct) then
           sarg = defaultvalue.spec
         elsif defaultvalue
           sarg = defaultvalue
         else
           sarg = DEFAULTFONT
         end
  r=SWin::CommonDialog::chooseFont(self, sarg)
  if r then
    FontStruct.new2(r)
  else
    r
  end
end

#openFilenameDialog(*arg) ⇒ Object

VRCommonDialog

Additional module for common dialogs. You can omit the first argument of the method of SWin::CommonDialog using this module.

Methods

— openFilenameDialog(*arg) — saveFilenameDialog(*arg) — chooseColorDialog(*arg) — chooseFontDialog(*arg) — selectDirectory(*arg)



684
685
686
# File 'lib/vr/vruby.rb', line 684

def openFilenameDialog(*arg)
  SWin::CommonDialog::openFilename(self, *arg)
end

#saveFilenameDialog(*arg) ⇒ Object



687
688
689
# File 'lib/vr/vruby.rb', line 687

def saveFilenameDialog(*arg)
  SWin::CommonDialog::saveFilename(self, *arg)
end

#selectDirectory(*arg) ⇒ Object



711
712
713
# File 'lib/vr/vruby.rb', line 711

def selectDirectory(*arg)
  SWin::CommonDialog::selectDirectory self,*arg
end