<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Aplot axes labels?]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=874&amp;type=atom" />
	<updated>2022-12-12T21:38:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=874</id>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4025#p4025" />
			<content type="html"><![CDATA[<p>Jeff,</p><p>Thank you for your suggestion to set all closeflags to .FALSE.&nbsp; I have now set the closeflag of all windows (parent and childs) to &#039;closeflag=.FALSE..&nbsp; However, setting the closeflag to .FALSE. is not preventing the parent and child windows of Appgraphics from closing when the &#039;X&#039; is selected. I&#039;ve only been successful in inactivating the &#039;X&#039; when setwindowsystemclosecallback is used. Clearly, I must be doing something wrong, but till now I&#039;ve not been able to identify the problem.&nbsp; Although this not a big problem and the setwindowsystemclosecallback fixes it, I will continue to explore why closeflags set to .FALSE. do not prevent my windows from closing.</p><p> The following is the code I used to inactivate the windows &#039;X&#039; (This approach works perfectly.).<br />&nbsp; &nbsp; &nbsp; &nbsp; !///////////////////////////////////////////////////////////////<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- Get main window that signalled the child window<br />&nbsp; &nbsp; &nbsp; &nbsp; idActiveWin = getsignallingwindow()</p><p>&nbsp; &nbsp; &nbsp; &nbsp; !--- Create AppGraphics plot window<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- function initwindow (width, height, title, left, top, dbflag, closeflag)<br />&nbsp; &nbsp; &nbsp; &nbsp; myscreen2 = initwindow(510, 440, &#039;Plot Data&#039;, closeflag=.FALSE.)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; !--- Set font style to Sans Serif<br />&nbsp; &nbsp; &nbsp; &nbsp; call settextstyle (SANS_SERIF_FONT, HORIZ_DIR, 14)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; !--- TURN OFF THE CLOSEFLAG &#039;X&#039; IN THE CHILD WINDOW<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- Sets a callback procedure to be called when the<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- user clicks the “X” (close button) in the upper corner<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- on a window or selects “Close” in the window’s system<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- menu. The callback should be a simple function that<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- returns 0 if the window is to be kept open, or 1 if<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- the window should close.<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- The callback is IGNORED if the window was created with<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- closeflag set to TRUE in the initwindow call&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; !---<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- When the Initwindow closeflag=.TRUE.and the call to<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- setwindowsystemclosecallback &#039;closeflag-active&#039;, the user<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- is asked &#039;Yes/No&#039; whether to terminate the entire program.<br />&nbsp; &nbsp; &nbsp; &nbsp; !---call setwindowsystemclosecallback (closeflag_active)<br />&nbsp; &nbsp; &nbsp; &nbsp; CALL setwindowsystemclosecallback (closeflag_cancel)<br />&nbsp; &nbsp; &nbsp; &nbsp; !///////////////////////////////////////////////////////////////</p><p>I&#039;m sure you&#039;ll let me know if you have any further suggestions; otherwise I&#039;ll keep exploring.</p><p>Thanks,</p><p>Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2022-12-12T21:38:57Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4025#p4025</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4024#p4024" />
			<content type="html"><![CDATA[<p>Frank,</p><p>To the best of my knowledge, you can&#039;t actually disable the Close button on a window without actually changing some rather basic aspects of how the window functions/looks.&nbsp; All you can do is catch and stop it.</p><p>Your messages mentioned that you&#039;ve set <em>closeflag</em> to <em>.true.</em>, which is causing everything to terminate.&nbsp; I honestly don&#039;t enable <em>closeflag</em> very often as it terminates the program entirely.&nbsp; It might be better to start setting it to <em>.false.</em> everywhere.&nbsp; When a window closes, your program could just cleanly handle the closing procedure.&nbsp; At the very least, I would definitely set <em>closeflag</em> to <em>.false.</em> on these child plot windows to avoid the program terminating when they close or your having to implement the <em>setwindowsystemclosecallback</em> handler.</p><p>Thank you for letting me know about the typo!</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-12-12T12:29:14Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4024#p4024</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4023#p4023" />
			<content type="html"><![CDATA[<p>Hi Jeff,</p><p>Thank you adding the Aplot embedding feature to SF. In my previous message I wrote, &quot;The only issue I encountered was the use of &#039;closeflag&#039; in the AppGraphics &#039;initwindow&#039; function. When the &#039;X&#039; in the upper right hand corner of the graphics child window was selected, it always closed both the child window and the parent window. In order to maintain an active parent window (when closing the child window), the &#039;setwindowsystemclosecallback&#039; procedure was used to disable the &#039;X&#039; in the child window. This solved the problem so that the parent window stayed active.&quot;.</p><p>Regarding the issue of the &quot;X&quot; in the upper right corner of the window, I was wondering whether it could be &quot;grayed out&quot; or even removed when the &quot;setwindowsystemclosecallback&quot; procedure is used to make the &quot;X&quot; inactive?&nbsp; I ask this question because I always seem to be selecting the &quot;X&quot; to close windows since it looks like all the other window &quot;X&#039;s&quot; that are active.&nbsp; </p><p>Is it feasible to &quot;gray out&quot; or remove it when inactive?</p><p>Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2022-12-11T16:53:35Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4023#p4023</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4018#p4018" />
			<content type="html"><![CDATA[<p>Hi Jeff,</p><p>I implemented the embed_plot procedure to embed an Aplot in one of my SF graphics programs and it worked as expected with no issues.&nbsp; Your example was easy to understand and allowed the straight forward incorporation of embed_plot in my program. In addition, the inclusion of menus to change axes labels in the AppGraphics windows was straight forward. The only issue I encountered was the use of &#039;closeflag&#039; in the AppGraphics &#039;initwindow&#039; function. When the &#039;X&#039; in the upper right hand corner of the graphics child window was selected, it always closed both the child window and the parent window. In order to maintain an active parent window, the &#039;setwindowsystemclosecallback&#039; procedure was used to disable the &#039;X&#039; in the child window. This solved the problem so that the parent window stayed active.</p><p>Please note that SF &#039;Help/AppGraphics/Window Management&#039; has a typagraphical error in the &#039;setwindowsystemclosecallback&#039; reference (see below).</p><p>setwindowsystemclosecallback<br />C void setwindowclosecallback (callback)&nbsp; &nbsp; &lt;--- setwindowsystemclosecallback<br />Fortran subroutine setwindowclosecallback (callback)&nbsp; &nbsp;&lt;--- setwindowsystemclosecallback</p><p>Thank you again for all your effort and time in adding these new features to SF.</p><p>Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2022-11-14T16:31:10Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4018#p4018</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4016#p4016" />
			<content type="html"><![CDATA[<p>Frank,</p><p>We have our post up at <a href="https://simplyfortran.com/blog/10/">https://simplyfortran.com/blog/10/</a>.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-11-09T16:57:47Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4016#p4016</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4015#p4015" />
			<content type="html"><![CDATA[<p>Hi Jeff,</p><p>Thank you for adding functionality to the Windows Aplot graphing application. I look forward to applying this new feature and reviewing your informative example program of how it interfaces smoothly with AppGraphics.</p><p>Thanks again for all your effort in continually improving SimplyFortran.</p><p>Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2022-11-09T12:52:22Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4015#p4015</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4014#p4014" />
			<content type="html"><![CDATA[<p>Frank,</p><p>I still need to write up a good post about using some new Aplot features, but the new <em>embed_plot</em> call might be what you&#039;re looking for in Simply Fortran 3.26.&nbsp; You can read about it at <a href="https://simplyfortran.com/docs/aplot/reference.html">the bottom of the Aplot reference page under <strong>Windows-Specific Functionality</strong></a>.&nbsp; I should have an example up in the next day or two.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-11-08T13:36:44Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4014#p4014</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4013#p4013" />
			<content type="html"><![CDATA[<p>Jeff,</p><p>Indeed a very nice treat for Halloween.&nbsp; Thank you so much! <img src="https://forums.approximatrix.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> </p><p>Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2022-10-31T17:00:34Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4013#p4013</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4012#p4012" />
			<content type="html"><![CDATA[<p>Frank,</p><p>At this time, no, it isn&#039;t possible.&nbsp; However, we are adding some substantial functionality to Aplot and AppGraphics on Windows with the next release that should allow you to add the feature a bit more manually.&nbsp; The release should be out this week (I&#039;m working on some minor issues with documentation, macOS problems, etc. as I type this).&nbsp; I&#039;ll try to get a blog post together about the new feature.&nbsp; Basically, it introduces a new Aplot call, <em>embed_plot</em> that should provide the flexibility you need.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2022-10-31T14:39:05Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4012#p4012</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Aplot axes labels?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4011#p4011" />
			<content type="html"><![CDATA[<p>Hi Jeff,</p><p>Is it possible to add a menu option to Aplot that would allow the axes and title labels to be revised while in the application?&nbsp; I realize that this may not be feasible, but perhaps there is a work around.</p><p>I believe that I may have asked this question before, so expecting the answer is no.</p><p>Thanks for all you support,<br />Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2022-10-31T13:51:00Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4011#p4011</id>
		</entry>
</feed>
