@@ -142,7 +142,7 @@ impl Widget {
142142 ( rect. right - rect. left , rect. bottom - rect. top )
143143 }
144144
145- fn set_sized ( & self , v : ( i32 , i32 ) ) {
145+ fn set_sized ( & mut self , v : ( i32 , i32 ) ) {
146146 let handle = self . as_raw_window ( ) ;
147147 if v != self . sized ( ) {
148148 syscall ! (
@@ -165,7 +165,7 @@ impl Widget {
165165 self . size_d2l ( self . sized ( ) )
166166 }
167167
168- pub fn set_size ( & self , v : Size ) {
168+ pub fn set_size ( & mut self , v : Size ) {
169169 self . set_sized ( self . size_l2d ( v) )
170170 }
171171
@@ -188,7 +188,7 @@ impl Widget {
188188 }
189189 }
190190
191- fn set_locd ( & self , p : ( i32 , i32 ) ) {
191+ fn set_locd ( & mut self , p : ( i32 , i32 ) ) {
192192 let handle = self . as_raw_window ( ) ;
193193 if p != self . locd ( ) {
194194 syscall ! (
@@ -211,7 +211,7 @@ impl Widget {
211211 self . point_d2l ( self . locd ( ) )
212212 }
213213
214- pub fn set_loc ( & self , p : Point ) {
214+ pub fn set_loc ( & mut self , p : Point ) {
215215 self . set_locd ( self . point_l2d ( p) )
216216 }
217217
@@ -239,7 +239,7 @@ impl Widget {
239239 self . text_u16 ( ) . to_string_lossy ( )
240240 }
241241
242- pub fn set_text ( & self , s : impl AsRef < str > ) {
242+ pub fn set_text ( & mut self , s : impl AsRef < str > ) {
243243 let handle = self . as_raw_window ( ) ;
244244 let s = U16CString :: from_str_truncate ( s) ;
245245 syscall ! ( BOOL , unsafe { SetWindowTextW ( handle, s. as_ptr( ) ) } ) . unwrap ( ) ;
@@ -272,7 +272,7 @@ impl Widget {
272272 . unwrap ( )
273273 }
274274
275- pub fn set_style ( & self , style : u32 ) {
275+ pub fn set_style ( & mut self , style : u32 ) {
276276 unsafe { SetLastError ( 0 ) } ;
277277 let res = syscall ! (
278278 BOOL ,
@@ -289,7 +289,7 @@ impl Widget {
289289 }
290290 }
291291
292- pub fn set_icon ( & self , icon : HICON ) {
292+ pub fn set_icon ( & mut self , icon : HICON ) {
293293 unsafe {
294294 SendMessageW ( self . as_raw_window ( ) , WM_SETICON , ICON_BIG as _ , icon as _ ) ;
295295 }
0 commit comments