Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Panel Service ID Processing by FS Panel System

Featured Replies

  • Moderator

Some months ago, Dai Griffiths asked me if I had any information on the order of the Panel Service IDs in FS panel system. I finally managed to locate what information I do have, so I'm posting it here for general information:

#define PANEL_SERVICE_CONNECT_TO_WINDOW	// on load step 1#define PANEL_SERVICE_PRE_QUERY		// on load step 2#define PANEL_SERVICE_POST_QUERY	// on load step 3#define PANEL_SERVICE_PRE_INSTALL	// first view only step 1#define PANEL_SERVICE_POST_INSTALL	// first view only step 2#define PANEL_SERVICE_PRE_INITIALIZE 	// any window open/close/move/resize step 1#define PANEL_SERVICE_POST_INITIALIZE#define PANEL_SERVICE_PRE_GENERATE	// any windows open/close/move/resize step 2#define PANEL_SERVICE_POST_GENERATE#define PANEL_SERVICE_PANEL_OPEN	// when window opened step 1 if already pre_install#define PANEL_SERVICE_PANEL_CLOSE	// when window closed step 1 then init and generate#define PANEL_SERVICE_PRE_UPDATE	// runs all the time if already viewed at tick18#define PANEL_SERVICE_POST_UPDATE		#define PANEL_SERVICE_PRE_DRAW		// runs when gauge being viewed at tick18#define PANEL_SERVICE_POST_DRAW		#define PANEL_SERVICE_PRE_KILL		// on unload step 1#define PANEL_SERVICE_POST_KILL		#define PANEL_SERVICE_DISCONNECT	// on unload step 2

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member

It's not quite the answer I was after - I was wondering exactly what each statement did in particular. For example, why would you code in _PRE_DRAW as opposed to _PRE_UPDATE etc. etc.. One thing I can add here; if anyone is looking for a panel service ID that is called only once during the lifetime of the panel (e.g. for one-time loading/unloading of something) then your only choices are _CONNECT_TO_WINDOW and _DISCONNECT. All other panel service IDs can be called more than once during the lifetime of the panel as Bill shows.-Dai

  • Author
  • Moderator

As noted, PREDRAW only runs when being viewed. So it is a good place to put undate code that doesn't need to be run if not currently on screen. After all, what's the point of running a GDI/GDI+ bit of drawing code if the results can't be seen?OTOH, it's not at all certain that any of the above is the precisely the same in the case of FSX. It was recently brought to my attention that in FSX, the [VCockpitnn] sections are processed in reverse order, from last to first! :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Somewhere, I have a diagnostic gauge that logs them all, as they occur, so you can see how they occur, relative to one another. I'll see if I can find it...Doug

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.