#[repr(C)]pub struct XPLMCreateMapLayer_t {
pub structSize: c_int,
pub mapToCreateLayerIn: *const c_char,
pub layerType: XPLMMapLayerType,
pub willBeDeletedCallback: XPLMMapWillBeDeletedCallback_f,
pub prepCacheCallback: XPLMMapPrepareCacheCallback_f,
pub drawCallback: XPLMMapDrawingCallback_f,
pub iconCallback: XPLMMapIconDrawingCallback_f,
pub labelCallback: XPLMMapLabelDrawingCallback_f,
pub showUiToggle: c_int,
pub layerName: *const c_char,
pub refcon: *mut c_void,
}Expand description
XPLMCreateMapLayer_t
This structure defines all of the parameters used to create a map layer using XPLMCreateMapLayer. The structure will be expanded in future SDK APIs to include more features. Always set the structSize member to the size of your struct in bytes!
Each layer must be associated with exactly one map instance in X-Plane. That map, and that map alone, will call your callbacks. Likewise, when that map is deleted, your layer will be as well.
Fields§
§structSize: c_intUsed to inform XPLMCreateMapLayer() of the SDK version you compiled * against; should always be set to sizeof(XPLMCreateMapLayer_t)
mapToCreateLayerIn: *const c_charGlobally unique string identifying the map you want this layer to appear * in. As of XPLM300, this is limited to one of XPLM_MAP_USER_INTERFACE or * XPLM_MAP_IOS
layerType: XPLMMapLayerTypeThe type of layer you are creating, used to determine draw order (all * plugin-created markings layers are drawn above all plugin-created fill * layers)
willBeDeletedCallback: XPLMMapWillBeDeletedCallback_fOptional callback to inform you this layer is being deleted (due to its * owning map being destroyed)
prepCacheCallback: XPLMMapPrepareCacheCallback_fOptional callback you want to use to prepare your draw cache when the map * bounds change (set to NULL if you don’t want this callback)
drawCallback: XPLMMapDrawingCallback_fOptional callback you want to use for arbitrary OpenGL drawing, which goes * beneath all icons in the map’s layering system (set to NULL if you don’t * want this callback)
iconCallback: XPLMMapIconDrawingCallback_fOptional callback you want to use for drawing icons, which go above all * built-in X-Plane icons (except the aircraft) in the map’s layering system * (set to NULL if you don’t want this callback)
labelCallback: XPLMMapLabelDrawingCallback_fOptional callback you want to use for drawing map labels, which go above * all built-in X-Plane icons and labels (except those of aircraft) in the * map’s layering system (set to NULL if you don’t want this callback)
showUiToggle: c_intTrue if you want a checkbox to be created in the map UI to toggle this * layer on and off; false if the layer should simply always be enabled
layerName: *const c_charShort label to use for this layer in the user interface
refcon: *mut c_voidA reference to arbitrary data that will be passed to your callbacks
Trait Implementations§
Source§impl Clone for XPLMCreateMapLayer_t
impl Clone for XPLMCreateMapLayer_t
Source§fn clone(&self) -> XPLMCreateMapLayer_t
fn clone(&self) -> XPLMCreateMapLayer_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more