/[paragui]/paragui/include/pgpopupmenu.h
ViewVC logotype

Diff of /paragui/include/pgpopupmenu.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.6.3.2.2 by braindead, Mon Nov 24 09:17:20 2003 UTC revision 1.3.6.3.2.3 by braindead, Tue Dec 2 15:27:58 2003 UTC
# Line 30  Line 30 
30  #ifndef PG_POPUPMENU_H  #ifndef PG_POPUPMENU_H
31  #define PG_POPUPMENU_H  #define PG_POPUPMENU_H
32    
 #ifdef SWIG  
 %include "swigcommon.h"  
 %module pgpopupmenu  
 %{  
 #include "pgpopupmenu.h"  
 %}  
 #endif  
   
33  #include "pgthemewidget.h"  #include "pgthemewidget.h"
34  #include "pgsignals.h"  #include "pgsignals.h"
35    
# Line 88  public: Line 80  public:
80           * @todo better separator code           * @todo better separator code
81           * @todo icon drawing           * @todo icon drawing
82           */           */
 #ifndef SWIG  
83          class MenuItem : public PG_Rect, public PG_MessageObject {          class MenuItem : public PG_Rect, public PG_MessageObject {
84          public: // types          public: // types
85                  enum MI_FLAGS {                  enum MI_FLAGS {
# Line 188  public: Line 179  public:
179          }          }
180  };  };
181  #endif // DOXYGEN_SKIP  #endif // DOXYGEN_SKIP
 #endif // SWIG  
182    
183  public: // methods  public: // methods
184    
# Line 211  public: // methods Line 201  public: // methods
201           *@{           *@{
202           */           */
203    
 #ifndef SWIG  
204          /**          /**
205           * Adds a menu item whose handler (if any) is set to be a stand-alone           * Adds a menu item whose handler (if any) is set to be a stand-alone
206           * function.           * function.
# Line 238  public: // methods Line 227  public: // methods
227                                  PG_PopupMenu *sub,                                  PG_PopupMenu *sub,
228                                  MenuItem::MI_FLAGS flags = MenuItem::MIF_SUBMENU);                                  MenuItem::MI_FLAGS flags = MenuItem::MIF_SUBMENU);
229    
 #endif // SWIG  
   
230          /**          /**
231           * @return a reference to this menu           * @return a reference to this menu
232           *@}           *@}
# Line 271  public: // methods Line 258  public: // methods
258    
259  protected: // methods  protected: // methods
260    
 #ifndef SWIG  
261          typedef list<MenuItem*>::iterator MII;          typedef list<MenuItem*>::iterator MII;
 #endif // SWIG  
262    
263          // reimplemented          // reimplemented
264          void eventBlit(SDL_Surface* srf, const PG_Rect& src, const PG_Rect& dst);          void eventBlit(SDL_Surface* srf, const PG_Rect& src, const PG_Rect& dst);
# Line 301  protected: // methods Line 286  protected: // methods
286          virtual void liberate();          virtual void liberate();
287    
288  private: // methods  private: // methods
289  #ifndef SWIG  
290          bool selectItem(MenuItem *item, MII iter);          bool selectItem(MenuItem *item, MII iter);
291          bool handleMotion(PG_Point const&);          bool handleMotion(PG_Point const&);
292          void appendItem(MenuItem *item);          void appendItem(MenuItem *item);
 #endif //SWIG  
293    
294  protected: // data  protected: // data
295  #ifndef SWIG  
296          list<MenuItem*>  items; /** the menu items collection */          list<MenuItem*>  items; /** the menu items collection */
297          string           myCaption; /** menu caption */          string           myCaption; /** menu caption */
 #endif //SWIG  
298    
299          PG_Color             captionActiveColor;          PG_Color             captionActiveColor;
300          PG_Color             captionInactiveColor;          PG_Color             captionInactiveColor;
# Line 351  private: // data Line 334  private: // data
334          MenuItem             *subParent;          MenuItem             *subParent;
335  };  };
336    
 #ifndef SWIG  
337  inline int PG_PopupMenu::maxItemWidth() const {  inline int PG_PopupMenu::maxItemWidth() const {
338          return w - xPadding;          return w - xPadding;
339  }  }
# Line 438  inline PG_PopupMenu::MenuItem::operator Line 420  inline PG_PopupMenu::MenuItem::operator
420          return myPoint;          return myPoint;
421  }  }
422    
 #endif // SWIG  
   
423  #endif // PG_POPUPMENU_H  #endif // PG_POPUPMENU_H

Legend:
Removed from v.1.3.6.3.2.2  
changed lines
  Added in v.1.3.6.3.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26