[futurebasic] Floating palette and edit menu options

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2004 : Group Archive : Group : All Groups

From: Bernie Wylde <bernie.w@...>
Date: Mon, 19 Jan 2004 20:57:17 +0000
Any ideas how I can make edit menu options work with floating palettes?

TIA
Bernie


'~'A
'                       Runtime : Rntm Appearance.Incl
'                           CPU : Carbon
'~'B
_wWindow1 = 1
_wWindow2 = 2

_cFloatText = 1
_cDocText = 1

_mFile = 1
_iQuit = 1
_mEdit = 2

local fn BuildwWindow1
dim as WindowAttributes wa
dim as rect             r

wa = _kWindowCloseBoxAttribute¬
      _kWindowCollapseBoxAttribute¬
      _kWindowFullZoomAttribute¬
      _kWindowResizableAttribute

SetRect(r, 309, 236, 754, 540)
appearance window -_wWindow1,¬
                   "Window 1", @r,¬
                   _kFloatingWindowClass, wa

SetRect(r, 23, 23, 422, 243)
appearance button _cFloatText,¬
                   _activeBtn,¬
                   ,,,, @r,¬
                   _kControlEditTextProc
def SetButtonTextString(_cFloatText, "Text")

appearance window _wWindow1
end fn

local fn BuildwWindow2
dim as WindowAttributes wa
dim as rect             r

wa = _kWindowCloseBoxAttribute¬
      _kWindowCollapseBoxAttribute¬
      _kWindowFullZoomAttribute¬
      _kWindowResizableAttribute

SetRect(r, 14, 57, 537, 360)
appearance window -_wWindow2,¬
                   "Window 2", @r,¬
                   _kDocumentWindowClass, wa

SetRect(r, 23, 23, 500, 243)
appearance button _cDocText,¬
                   _activeBtn,¬
                   ,,,, @r,¬
                   _kControlEditTextProc
def SetButtonTextString(_cDocText, "Text")

appearance window _wWindow2
end fn

local fn BuildMenus
menu _mFile, 0, _enable, "File"
menu _mFile, _iQuit, _enable, "Quit/Q"
gFBEditSelectAll = _zTrue
edit menu _mEdit
end fn

local fn Init
fn BuildMenus
fn BuildwWindow1
fn BuildwWindow2
end fn

local fn DoDialog
dim as long ev, id

ev = dialog(0)
id = dialog(ev)
select ev
end select
end fn

fn Init

on dialog fn DoDialog

do
HandleEvents
until gFBQuit