@@ -1786,7 +1786,36 @@ pub enum NSModalResponse {
1786
1786
NSModalResponseCancel = 0 ,
1787
1787
}
1788
1788
1789
- pub trait NSOpenPanel : Sized {
1789
+ pub trait NSSavePanel : Sized {
1790
+ unsafe fn savePanel ( _: Self ) -> id {
1791
+ msg_send ! [ class!( NSSavePanel ) , savePanel]
1792
+ }
1793
+
1794
+ unsafe fn setDirectoryURL ( self , url : id ) ;
1795
+ unsafe fn setCanCreateDirectories ( self , canCreateDirectories : BOOL ) ;
1796
+ unsafe fn URL ( self ) -> id ;
1797
+ unsafe fn runModal ( self ) -> NSModalResponse ;
1798
+ }
1799
+
1800
+ impl NSSavePanel for id {
1801
+ unsafe fn setDirectoryURL ( self , url : id ) {
1802
+ msg_send ! [ self , setDirectoryURL: url]
1803
+ }
1804
+
1805
+ unsafe fn setCanCreateDirectories ( self , canCreateDirectories : BOOL ) {
1806
+ msg_send ! [ self , setCanCreateDirectories: canCreateDirectories]
1807
+ }
1808
+
1809
+ unsafe fn URL ( self ) -> id {
1810
+ msg_send ! [ self , URL ]
1811
+ }
1812
+
1813
+ unsafe fn runModal ( self ) -> NSModalResponse {
1814
+ msg_send ! [ self , runModal]
1815
+ }
1816
+ }
1817
+
1818
+ pub trait NSOpenPanel : NSSavePanel {
1790
1819
unsafe fn openPanel ( _: Self ) -> id {
1791
1820
msg_send ! [ class!( NSOpenPanel ) , openPanel]
1792
1821
}
@@ -1796,7 +1825,6 @@ pub trait NSOpenPanel: Sized {
1796
1825
unsafe fn setResolvesAliases_ ( self , resolvesAliases : BOOL ) ;
1797
1826
unsafe fn setAllowsMultipleSelection_ ( self , allowsMultipleSelection : BOOL ) ;
1798
1827
unsafe fn URLs ( self ) -> id ;
1799
- unsafe fn runModal ( self ) -> NSModalResponse ;
1800
1828
}
1801
1829
1802
1830
impl NSOpenPanel for id {
@@ -1819,10 +1847,6 @@ impl NSOpenPanel for id {
1819
1847
unsafe fn URLs ( self ) -> id {
1820
1848
msg_send ! [ self , URLs ]
1821
1849
}
1822
-
1823
- unsafe fn runModal ( self ) -> NSModalResponse {
1824
- msg_send ! [ self , runModal]
1825
- }
1826
1850
}
1827
1851
1828
1852
#[ repr( usize ) ]
0 commit comments