Mercurial > dwindows
comparison ios/dw.m @ 2888:ec0d34798706
iOS: Allow dw_window_s/get_data() on menu items.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 22 Dec 2022 19:08:39 +0000 |
parents | 86286f528adf |
children | 761b7a12b079 |
comparison
equal
deleted
inserted
replaced
2887:e8d28682f6bd | 2888:ec0d34798706 |
---|---|
732 @interface DWMenuItem : UIAction | 732 @interface DWMenuItem : UIAction |
733 { | 733 { |
734 BOOL check, enabled; | 734 BOOL check, enabled; |
735 unsigned long tag; | 735 unsigned long tag; |
736 DWMenu *submenu, *menu; | 736 DWMenu *submenu, *menu; |
737 void *userdata; | |
737 } | 738 } |
738 -(void)setCheck:(BOOL)input; | 739 -(void)setCheck:(BOOL)input; |
739 -(void)setEnabled:(BOOL)input; | 740 -(void)setEnabled:(BOOL)input; |
740 -(void)setTag:(unsigned long)input; | 741 -(void)setTag:(unsigned long)input; |
741 -(void)setSubmenu:(DWMenu *)input; | 742 -(void)setSubmenu:(DWMenu *)input; |
743 -(DWMenu *)submenu; | 744 -(DWMenu *)submenu; |
744 -(DWMenu *)menu; | 745 -(DWMenu *)menu; |
745 -(BOOL)check; | 746 -(BOOL)check; |
746 -(BOOL)enabled; | 747 -(BOOL)enabled; |
747 -(unsigned long)tag; | 748 -(unsigned long)tag; |
749 -(void *)userdata; | |
750 -(void)setUserdata:(void *)input; | |
748 -(void)dealloc; | 751 -(void)dealloc; |
749 @end | 752 @end |
750 | 753 |
751 /* So basically to implement our event handlers... | 754 /* So basically to implement our event handlers... |
752 * it looks like we are going to have to subclass | 755 * it looks like we are going to have to subclass |
1810 -(BOOL)check { return check; } | 1813 -(BOOL)check { return check; } |
1811 -(BOOL)enabled { return enabled; } | 1814 -(BOOL)enabled { return enabled; } |
1812 -(DWMenu *)submenu { return submenu; } | 1815 -(DWMenu *)submenu { return submenu; } |
1813 -(DWMenu *)menu { return menu; } | 1816 -(DWMenu *)menu { return menu; } |
1814 -(unsigned long)tag { return tag; } | 1817 -(unsigned long)tag { return tag; } |
1815 -(void)dealloc { dw_signal_disconnect_by_window(self); [super dealloc]; } | 1818 -(void *)userdata { return userdata; } |
1819 -(void)setUserdata:(void *)input { userdata = input; } | |
1820 -(void)dealloc { UserData *root = userdata; _dw_remove_userdata(&root, NULL, TRUE); dw_signal_disconnect_by_window(self); [super dealloc]; } | |
1816 @end | 1821 @end |
1817 /* | 1822 /* |
1818 * Encapsulate immutable objects in our own containers, | 1823 * Encapsulate immutable objects in our own containers, |
1819 * so we can recreate the immutable subobjects as needed. | 1824 * so we can recreate the immutable subobjects as needed. |
1820 * Currently in this category: DWMenu and DWImage | 1825 * Currently in this category: DWMenu and DWImage |