home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
w_genapp_frame.srw
< prev
next >
Wrap
Text File
|
1997-09-30
|
3KB
|
143 lines
$PBExportHeader$w_genapp_frame.srw
$PBExportComments$Generated MDI frame window
forward
global type w_genapp_frame from window
end type
type mdi_1 from mdiclient within w_genapp_frame
end type
end forward
shared variables
// User defined attributes
// Non modeled user defined attributes
end variables
global type w_genapp_frame from window
WindowType WindowType = mdihelp!
string MenuName = "m_genapp_frame"
int X = 257
int Y = 133
int Width = 1847
int Height = 1301
boolean TitleBar = true
string Title = "Frame"
long BackColor = 276791167
boolean ControlMenu = true
boolean MinBox = true
boolean MaxBox = true
boolean Resizable = true
event enableprint pbm_custom01
mdi_1 mdi_1
end type
global w_genapp_frame w_genapp_frame
type variables
// User defined attributes
// Association attributes
// Non modeled user defined attributes
// Control to class mappings
// w_genapp_frame --> w_genapp_frame
end variables
forward prototypes
public subroutine wf_closesheet ()
public subroutine wf_setmenutext (m_genapp_frame menu_reference)
public subroutine wf_enableprint (boolean enable)
public function integer wf_getsheetcount ()
public function integer wf_newsheet ()
end prototypes
event enableprint;boolean lb_enable
m_genapp_frame lm_genapp_frame
/* Enable or disable printing */
lm_genapp_frame = menuid
if message.wordparm <> 0 then lb_enable = true
lm_genapp_frame.m_file.m_print.enabled = lb_enable
end event
public subroutine wf_closesheet ();window lw_Sheet
/* Close active sheet */
lw_Sheet = this.GetActiveSheet ()
if IsValid (lw_Sheet) then
Close (lw_Sheet)
end if
end subroutine
public subroutine wf_setmenutext (m_genapp_frame menu_reference);Environment lenv_env
/* Change menu "Exit" text based on platform */
GetEnvironment (lenv_env)
if lenv_env.ostype = Windows! then
menu_reference.m_file.m_exit.text = "E&xit"
elseif lenv_env.ostype = Macintosh! then
menu_reference.m_file.m_exit.text = "Quit"
end if
end subroutine
public subroutine wf_enableprint (boolean enable);/* Enable or disable printing */
if enable then
TriggerEvent ("enableprint", 1, 0)
else
PostEvent ("enableprint", 0, 0)
end if
end subroutine
public function integer wf_getsheetcount ();int li_Count
window lw_Sheet
/* Return number of open sheets */
lw_Sheet = this.GetFirstSheet ()
if IsValid (lw_Sheet) then
do
li_Count += 1
lw_Sheet = this.GetNextSheet (lw_Sheet)
loop while IsValid (lw_Sheet)
end if
return li_count
end function
public function integer wf_newsheet ();w_genapp_sheet lw_Sheet
/* Enable printing */
wf_enableprint (true)
/* Open a new instance of a sheet */
return OpenSheet (lw_Sheet, this, 3, layered!)
end function
on w_genapp_frame.create
if this.MenuName = "m_genapp_frame" then this.MenuID = create m_genapp_frame
this.mdi_1=create mdi_1
this.Control[]={ this.mdi_1}
end on
on w_genapp_frame.destroy
if IsValid(MenuID) then destroy(MenuID)
destroy(this.mdi_1)
end on
event open;/* Modify menu text for platform */
wf_setmenutext (menuid)
/* Create the initial sheet */
wf_newsheet ()
end event
type mdi_1 from mdiclient within w_genapp_frame
long BackColor = 276791167
end type