Rapicorn - Experimental UI Toolkit - Source Code  13.07.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
clientinsert.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
00002 
00003 // C++ interface code insertions for client stubs
00004 
00005 includes:
00006 #include <ui/utilities.hh>
00007 namespace Rapicorn {
00008 class WidgetImpl; // FIXME
00009 class WindowImpl;
00010 }
00011 
00012 IGNORE:
00013 struct DUMMY { // dummy class for auto indentation
00014 
00015 class_scope:StringSeq:
00016   explicit StringSeq () {}
00017   /*ctor*/ StringSeq (const std::vector<std::string> &strv) : Sequence (strv) {}
00018 
00019 class_scope:Pixbuf:
00021   explicit        Pixbuf       (uint w, uint h) : row_length (0) { pixels.resize (w, h); }
00023   void            resize       (uint w, uint h) { row_length = w; pixels.resize (row_length * h); }
00025   uint32_t*       row          (uint y)         { return y < uint32_t (height()) ? (uint32_t*) &pixels[row_length * y] : NULL; }
00027   const uint32_t* row          (uint y) const   { return y < uint32_t (height()) ? (uint32_t*) &pixels[row_length * y] : NULL; }
00029   int             width        () const         { return row_length; }
00031   int             height       () const         { return row_length ? pixels.size() / row_length : 0; }
00032 
00033 class_scope:UpdateSpan:
00034   explicit UpdateSpan (int _start, int _length) : start (_start), length (_length) {}
00035 
00036 class_scope:UpdateRequest:
00037   explicit UpdateRequest (UpdateKind _kind, const UpdateSpan &rs, const UpdateSpan &cs = UpdateSpan()) :
00038     kind (_kind), rowspan (rs), colspan (cs) {}
00039 
00040 class_scope:Requisition:
00041   inline Requisition (double w, double h) : width (w), height (h) {}
00042 
00043 class_scope:Widget:
00045   template<class Target> Target component (const std::string &selector) { return Target::down_cast (query_selector_unique (selector)); }
00046 
00047 class_scope:Application:
00048   static int                      run            ();
00049   static void                     quit           (int quit_code = 0);
00050   static void                     shutdown       ();
00051   static int                      run_and_exit   () RAPICORN_NORETURN;
00052   static ApplicationHandle        the            ();
00053 protected:
00054   static MainLoop*                main_loop     ();
00055 
00056 IGNORE: // close last _scope
00057 }; // close dummy class scope
00058 
00059 global_scope:
00060 namespace Rapicorn {
00061 
00062 bool              init_app_initialized    ();
00063 ApplicationHandle init_app                (const String       &app_ident,
00064                                            int                *argcp,
00065                                            char              **argv,
00066                                            const StringVector &args = StringVector());
00067 ApplicationHandle init_test_app           (const String       &app_ident,
00068                                            int                *argcp,
00069                                            char              **argv,
00070                                            const StringVector &args = StringVector());
00071 void              exit_app                (int status) RAPICORN_NORETURN;
00072 
00073 } // Rapicorn
00074 #define RAPICORN_PIXBUF_TYPE    Rapicorn::Pixbuf
00075 #include <ui/pixmap.hh>
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines