wxrust_base/generated/
class_m.rs

1use super::*;
2
3// wxMessageOutput
4wxwidgets! {
5    /// Simple class allowing to write strings to various output channels.
6    /// - [`MessageOutput`] represents a C++ `wxMessageOutput` class instance which your code has ownership, [`MessageOutputIsOwned`]`<false>` represents one which don't own.
7    /// - Use [`MessageOutput`]'s `new()` to create an instance of this class.
8    /// - See [C++ `wxMessageOutput` class's documentation](https://docs.wxwidgets.org/3.2/classwx_message_output.html) for more details.
9    #[doc(alias = "wxMessageOutput")]
10    #[doc(alias = "MessageOutput")]
11    class MessageOutput
12        = MessageOutputIsOwned<true>(wxMessageOutput) impl
13        MessageOutputMethods
14}
15impl<const OWNED: bool> MessageOutputIsOwned<OWNED> {
16    pub fn none() -> Option<&'static Self> {
17        None
18    }
19}
20impl Clone for MessageOutputIsOwned<false> {
21    fn clone(&self) -> Self {
22        Self(self.0)
23    }
24}
25impl<const OWNED: bool> Drop for MessageOutputIsOwned<OWNED> {
26    fn drop(&mut self) {
27        if OWNED {
28            unsafe { ffi::wxMessageOutput_delete(self.0) }
29        }
30    }
31}