Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

X Programming help.

Posted on 1997-08-19
2
Medium Priority
?
431 Views
Last Modified: 2013-12-26
I am currently working on a computer simulation with
as part of summer job. The simulation (to digress) essentially simulates polymers in solution. Part of my project is display some of the data in real time so that
I can see the progress of the system. The simulation itself
is written in Fortran 77(forgive this) and I have written
some code in C (using the X libraries(not Xt or Athena)).
      What the code does is open a window, draw some data generated from the fortran Code and then continues the same
until the simulation is done, which could take anywhere
from a few days to a week. My problem is that i need to
be able to minimize the window or resize so that I can continue to run it in the background and therefore allow
myself to monitor the progress of the system.
      I have not been able to modify my code such that
the window redraws after a minimization event or a resizing.
I have had some advice, mainly reffering to Xt and Athena,
unfortunately I am not familiar with these (of course I could learn them) but I need to modify the code before
the end of the summer, as this is a part a project that
I need to have done by then. The window is a small part
of my simulation but still very importanat. If anyone
can give me some advice or perhaps some "code", freeware
or whatever I would greatly appreciate. If need be I can send a copy of the code to anyone who can help so as they
can see exactly what it is supposed to do.

Regards/
Martin Kenward.
0
Comment
Question by:mkenward
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Expert Comment

by:pxh
ID: 1294465
What operating system are you using? Do you use xview? Basically I know how to do it in xview. For the basic xlib I should be able to find out.

Peter

0
 
LVL 1

Accepted Solution

by:
aecooper earned 100 total points
ID: 1294466
You need to register an interest in resize and window exposure events with xlib (see XNextEvent....). On receipt of the event simply redraw your window. How do you redraw, I don't keep the geometry info? Well create a pixmap and draw into that instead of onto the screen (pixmap = drawing buffer) and then update the screen by copying the pixmap to the display. If you keep the information necessary to redraw your screen this is even better since you don't have to use up resources for storing extra pixmaps etc. If you look in your X11 programming book you should see a chapter on event handling, its straight forward and there are usually plenty of examples.

    Hope this helps.

    Tony.

0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question