HA$PBExportHeader$pfc_u_gr.sru $PBExportComments$PFC Graph class forward global type pfc_u_gr from graph end type end forward global type pfc_u_gr from graph integer width = 347 integer height = 252 grgraphtype graphtype = colgraph! long textcolor = 33587200 long shadecolor = 6316128 integer spacing = 100 integer elevation = 20 integer rotation = -20 integer perspective = 2 integer depth = 100 grlegendtype legend = atbottom! boolean focusrectangle = false grsorttype seriessort = ascending! grsorttype categorysort = ascending! end type global pfc_u_gr pfc_u_gr forward prototypes public function integer of_getparentwindow (ref window aw_parent) protected function integer of_messagebox (string as_id, string as_title, string as_text, icon ae_icon, button ae_button, integer ai_default) end prototypes public function integer of_getparentwindow (ref window aw_parent);////////////////////////////////////////////////////////////////////////////// // // Function: of_GetParentWindow // // Access: public // // Arguments: // aw_parent The Parent window for this object (passed by reference). // If a parent window is not found, aw_parent is NULL // // Returns: integer // 1 = success // -1 = error // // Description: Calculates the parent window of a window object // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 5.0 Initial version // ////////////////////////////////////////////////////////////////////////////// // /* * Open Source PowerBuilder Foundation Class Libraries * * Copyright (c) 2004-2005, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted in accordance with the GNU Lesser General * Public License Version 2.1, February 1999 * * http://www.gnu.org/copyleft/lesser.html * * ==================================================================== * * This software consists of voluntary contributions made by many * individuals and was originally based on software copyright (c) * 1996-2004 Sybase, Inc. http://www.sybase.com. For more * information on the Open Source PowerBuilder Foundation Class * Libraries see http://pfc.codexchange.sybase.com */ // ////////////////////////////////////////////////////////////////////////////// powerobject lpo_parent lpo_parent = this.GetParent() // Loop getting the parent of the object until it is of type window! do while IsValid (lpo_parent) if lpo_parent.TypeOf() <> window! then lpo_parent = lpo_parent.GetParent() else exit end if loop if IsNull(lpo_parent) Or not IsValid (lpo_parent) then setnull(aw_parent) return -1 end If aw_parent = lpo_parent return 1 end function protected function integer of_messagebox (string as_id, string as_title, string as_text, icon ae_icon, button ae_button, integer ai_default);////////////////////////////////////////////////////////////////////////////// // // Function: of_MessageBox // // Access: protected // // Arguments: // as_id An ID for the Message. // as_title Text for title bar // as_text Text for the actual message. // ae_icon The icon you want to display on the MessageBox. // ae_button Set of CommandButtons you want to display on the MessageBox. // ai_default The default button. // // Returns: integer // Return value of the MessageBox. // // Description: // Display a PowerScript MessageBox. // Allow PFC MessageBoxes to be manipulated prior to their actual display. // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 6.0 Initial version // ////////////////////////////////////////////////////////////////////////////// // /* * Open Source PowerBuilder Foundation Class Libraries * * Copyright (c) 2004-2005, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted in accordance with the GNU Lesser General * Public License Version 2.1, February 1999 * * http://www.gnu.org/copyleft/lesser.html * * ==================================================================== * * This software consists of voluntary contributions made by many * individuals and was originally based on software copyright (c) * 1996-2004 Sybase, Inc. http://www.sybase.com. For more * information on the Open Source PowerBuilder Foundation Class * Libraries see http://pfc.codexchange.sybase.com */ // ////////////////////////////////////////////////////////////////////////////// Return MessageBox(as_title, as_text, ae_icon, ae_button, ai_default) end function on pfc_u_gr.create TitleDispAttr = create grDispAttr LegendDispAttr = create grDispAttr PieDispAttr = create grDispAttr Series = create grAxis Series.DispAttr = create grDispAttr Series.LabelDispAttr = create grDispAttr Category = create grAxis Category.DispAttr = create grDispAttr Category.LabelDispAttr = create grDispAttr Values = create grAxis Values.DispAttr = create grDispAttr Values.LabelDispAttr = create grDispAttr TitleDispAttr.Weight=700 TitleDispAttr.FaceName="Arial" TitleDispAttr.FontCharSet=DefaultCharSet! TitleDispAttr.FontFamily=Swiss! TitleDispAttr.FontPitch=Variable! TitleDispAttr.Alignment=Center! TitleDispAttr.TextColor=33554432 TitleDispAttr.BackColor=536870912 TitleDispAttr.Format="[General]" TitleDispAttr.DisplayExpression="title" TitleDispAttr.AutoSize=true Category.Label="(None)" Category.AutoScale=true Category.ShadeBackEdge=true Category.SecondaryLine=transparent! Category.MajorGridLine=transparent! Category.MinorGridLine=transparent! Category.DropLines=transparent! Category.OriginLine=transparent! Category.MajorTic=Outside! Category.DataType=adtText! Category.DispAttr.Weight=400 Category.DispAttr.FaceName="Arial" Category.DispAttr.FontCharSet=DefaultCharSet! Category.DispAttr.FontFamily=Swiss! Category.DispAttr.FontPitch=Variable! Category.DispAttr.Alignment=Center! Category.DispAttr.BackColor=536870912 Category.DispAttr.Format="[General]" Category.DispAttr.DisplayExpression="category" Category.DispAttr.AutoSize=true Category.LabelDispAttr.Weight=400 Category.LabelDispAttr.FaceName="Arial" Category.LabelDispAttr.FontCharSet=DefaultCharSet! Category.LabelDispAttr.FontFamily=Swiss! Category.LabelDispAttr.FontPitch=Variable! Category.LabelDispAttr.Alignment=Center! Category.LabelDispAttr.BackColor=536870912 Category.LabelDispAttr.Format="[General]" Category.LabelDispAttr.DisplayExpression="categoryaxislabel" Category.LabelDispAttr.AutoSize=true Values.Label="(None)" Values.AutoScale=true Values.SecondaryLine=transparent! Values.MajorGridLine=transparent! Values.MinorGridLine=transparent! Values.DropLines=transparent! Values.MajorTic=Outside! Values.DataType=adtDouble! Values.DispAttr.Weight=400 Values.DispAttr.FaceName="Arial" Values.DispAttr.FontCharSet=DefaultCharSet! Values.DispAttr.FontFamily=Swiss! Values.DispAttr.FontPitch=Variable! Values.DispAttr.Alignment=Right! Values.DispAttr.BackColor=536870912 Values.DispAttr.Format="[General]" Values.DispAttr.DisplayExpression="value" Values.DispAttr.AutoSize=true Values.LabelDispAttr.Weight=400 Values.LabelDispAttr.FaceName="Arial" Values.LabelDispAttr.FontCharSet=DefaultCharSet! Values.LabelDispAttr.FontFamily=Swiss! Values.LabelDispAttr.FontPitch=Variable! Values.LabelDispAttr.Alignment=Center! Values.LabelDispAttr.BackColor=536870912 Values.LabelDispAttr.Format="[General]" Values.LabelDispAttr.DisplayExpression="valuesaxislabel" Values.LabelDispAttr.AutoSize=true Values.LabelDispAttr.Escapement=900 Series.Label="(None)" Series.AutoScale=true Series.SecondaryLine=transparent! Series.MajorGridLine=transparent! Series.MinorGridLine=transparent! Series.DropLines=transparent! Series.OriginLine=transparent! Series.MajorTic=Outside! Series.DataType=adtText! Series.DispAttr.Weight=400 Series.DispAttr.FaceName="Arial" Series.DispAttr.FontCharSet=DefaultCharSet! Series.DispAttr.FontFamily=Swiss! Series.DispAttr.FontPitch=Variable! Series.DispAttr.BackColor=536870912 Series.DispAttr.Format="[General]" Series.DispAttr.DisplayExpression="series" Series.DispAttr.AutoSize=true Series.LabelDispAttr.Weight=400 Series.LabelDispAttr.FaceName="Arial" Series.LabelDispAttr.FontCharSet=DefaultCharSet! Series.LabelDispAttr.FontFamily=Swiss! Series.LabelDispAttr.FontPitch=Variable! Series.LabelDispAttr.Alignment=Center! Series.LabelDispAttr.BackColor=536870912 Series.LabelDispAttr.Format="[General]" Series.LabelDispAttr.DisplayExpression="seriesaxislabel" Series.LabelDispAttr.AutoSize=true LegendDispAttr.Weight=400 LegendDispAttr.FaceName="Arial" LegendDispAttr.FontCharSet=DefaultCharSet! LegendDispAttr.FontFamily=Swiss! LegendDispAttr.FontPitch=Variable! LegendDispAttr.BackColor=536870912 LegendDispAttr.Format="[General]" LegendDispAttr.DisplayExpression="series" LegendDispAttr.AutoSize=true PieDispAttr.Weight=400 PieDispAttr.FaceName="Arial" PieDispAttr.FontCharSet=DefaultCharSet! PieDispAttr.FontFamily=Swiss! PieDispAttr.FontPitch=Variable! PieDispAttr.BackColor=536870912 PieDispAttr.Format="[General]" PieDispAttr.DisplayExpression="if(seriescount > 1, series,string(percentofseries,~"0.00%~"))" PieDispAttr.AutoSize=true end on on pfc_u_gr.destroy destroy TitleDispAttr destroy LegendDispAttr destroy PieDispAttr destroy Series.DispAttr destroy Series.LabelDispAttr destroy Series destroy Category.DispAttr destroy Category.LabelDispAttr destroy Category destroy Values.DispAttr destroy Values.LabelDispAttr destroy Values end on event getfocus;////////////////////////////////////////////////////////////////////////////// // // Event: getfocus // // (Arguments: None) // // (Returns: None) // // Description: If appropriate, notify the parent window that this // control got focus. // ////////////////////////////////////////////////////////////////////////////// // // Revision History // // Version // 5.0 Initial version // ////////////////////////////////////////////////////////////////////////////// // /* * Open Source PowerBuilder Foundation Class Libraries * * Copyright (c) 2004-2005, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted in accordance with the GNU Lesser General * Public License Version 2.1, February 1999 * * http://www.gnu.org/copyleft/lesser.html * * ==================================================================== * * This software consists of voluntary contributions made by many * individuals and was originally based on software copyright (c) * 1996-2004 Sybase, Inc. http://www.sybase.com. For more * information on the Open Source PowerBuilder Foundation Class * Libraries see http://pfc.codexchange.sybase.com */ // ////////////////////////////////////////////////////////////////////////////// window lw_parent //Check for microhelp requirements. If gnv_app.of_GetMicrohelp() Then //Notify the parent. of_GetParentWindow(lw_parent) If IsValid(lw_parent) Then lw_parent.Dynamic Event pfc_ControlGotFocus (this) End If End If end event
File: pfc_u_gr.sru
Size: 11418
Date: Sat, 23 Mar 2013 16:23:04 +0100
Size: 11418
Date: Sat, 23 Mar 2013 16:23:04 +0100