Changeset 56220

Show
Ignore:
Timestamp:
10/10/08 12:14:22 (6 weeks ago)
Author:
FM
Message:

fix doxygen warnings

Location:
wxWidgets/trunk/interface/wx
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • wxWidgets/trunk/interface/wx/msw/ole/activex.h

    r54387 r56220  
    1919    Note that unlike the third party wxActiveX function names are not supported. 
    2020 
     21    @beginEventTable{wxActiveXEvent} 
     22    @event{EVT_ACTIVEX(func)} 
     23        Sent when the activex control hosted by wxActiveXContainer recieves an 
     24        activex event. 
     25    @endEventTable 
     26 
    2127    @onlyfor{wxmsw} 
    2228 
    2329    @library{wxbase} 
    24     @category{FIXME} 
     30    @category{events} 
    2531*/ 
    2632class wxActiveXEvent : public wxCommandEvent 
     
    2834public: 
    2935    /** 
    30         Returns the dispatch id of this activex event. This is the numeric value from 
    31         the .idl file specified by the id(). 
     36        Returns the dispatch id of this activex event. 
     37        This is the numeric value from the .idl file specified by the id(). 
    3238    */ 
    3339    DISPID GetDispatchId(int idx) const; 
     
    5965    @class wxActiveXContainer 
    6066 
    61     wxActiveXContainer is a host for an activex control on Windows (and 
    62     as such is a platform-specific class). Note that the HWND that the class 
    63     contains is the actual HWND of the activex control so using dynamic events 
    64     and connecting to wxEVT_SIZE, for example, will recieve the actual size 
    65     message sent to the control. 
     67    wxActiveXContainer is a host for an activex control on Windows (and as such 
     68    is a platform-specific class). 
     69 
     70    Note that the HWND that the class contains is the actual HWND of the activeX 
     71    control so using dynamic events and connecting to wxEVT_SIZE, for example, 
     72    will recieve the actual size message sent to the control. 
    6673 
    6774    It is somewhat similar to the ATL class CAxWindow in operation. 
     
    7077    of the client size of the parent of this wxActiveXContainer. 
    7178 
    72     You can also process activex events through wxEVT_ACTIVEX or the 
    73     corresponding message map macro EVT_ACTIVEX. 
     79    You can also process activeX events through wxActiveXEvent. 
     80 
     81 
     82    @section activexcontainer_example Example 
     83 
     84    This is an example of how to use the Adobe Acrobat Reader ActiveX control to 
     85    read PDF files (requires Acrobat Reader 4 and up). 
     86    Controls like this are typically found and dumped from OLEVIEW.exe that is 
     87    distributed with Microsoft Visual C++. 
     88    This example also demonstrates how to create a backend for wxMediaCtrl. 
     89 
     90    @code 
     91    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
     92    // 
     93    // wxPDFMediaBackend 
     94    // 
     95    // http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACOverview.pdf 
     96    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
     97 
     98    #include "wx/mediactrl.h"       // wxMediaBackendCommonBase 
     99    #include "wx/msw/ole/activex.h" // wxActiveXContainer 
     100    #include "wx/msw/ole/automtn.h" // wxAutomationObject 
     101 
     102    const IID DIID__DPdf = {0xCA8A9781,0x280D,0x11CF,{0xA2,0x4D,0x44,0x45,0x53,0x54,0x00,0x00}}; 
     103    const IID DIID__DPdfEvents = {0xCA8A9782,0x280D,0x11CF,{0xA2,0x4D,0x44,0x45,0x53,0x54,0x00,0x00}}; 
     104    const CLSID CLSID_Pdf = {0xCA8A9780,0x280D,0x11CF,{0xA2,0x4D,0x44,0x45,0x53,0x54,0x00,0x00}}; 
     105 
     106    class WXDLLIMPEXP_MEDIA wxPDFMediaBackend : public wxMediaBackendCommonBase 
     107    { 
     108    public: 
     109        wxPDFMediaBackend() : m_pAX(NULL) {} 
     110        virtual ~wxPDFMediaBackend() 
     111        { 
     112            if(m_pAX) 
     113            { 
     114                m_pAX->DissociateHandle(); 
     115                delete m_pAX; 
     116            } 
     117        } 
     118        virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, 
     119                                        wxWindowID id, 
     120                                        const wxPoint& pos, 
     121                                        const wxSize& size, 
     122                                        long style, 
     123                                        const wxValidator& validator, 
     124                                        const wxString& name) 
     125        { 
     126            IDispatch* pDispatch; 
     127            if( ::CoCreateInstance(CLSID_Pdf, NULL, 
     128                                    CLSCTX_INPROC_SERVER, 
     129                                    DIID__DPdf, (void**)&pDispatch) != 0 ) 
     130                return false; 
     131 
     132            m_PDF.SetDispatchPtr(pDispatch); // wxAutomationObject will release itself 
     133 
     134            if ( !ctrl->wxControl::Create(parent, id, pos, size, 
     135                                    (style & ~wxBORDER_MASK) | wxBORDER_NONE, 
     136                                    validator, name) ) 
     137                return false; 
     138 
     139            m_ctrl = wxStaticCast(ctrl, wxMediaCtrl); 
     140            m_pAX = new wxActiveXContainer(ctrl, 
     141                        DIID__DPdf, 
     142                        pDispatch); 
     143 
     144            wxPDFMediaBackend::ShowPlayerControls(wxMEDIACTRLPLAYERCONTROLS_NONE); 
     145            return true; 
     146        } 
     147 
     148        virtual bool Play() 
     149        { 
     150            return true; 
     151        } 
     152        virtual bool Pause() 
     153        { 
     154            return true; 
     155        } 
     156        virtual bool Stop() 
     157        { 
     158            return true; 
     159        } 
     160 
     161        virtual bool Load(const wxString& fileName) 
     162        { 
     163            if(m_PDF.CallMethod(wxT("LoadFile"), fileName).GetBool()) 
     164            { 
     165                m_PDF.CallMethod(wxT("setCurrentPage"), wxVariant((long)0)); 
     166                NotifyMovieLoaded(); // initial refresh 
     167                wxSizeEvent event; 
     168                m_pAX->OnSize(event); 
     169                return true; 
     170            } 
     171 
     172            return false; 
     173        } 
     174        virtual bool Load(const wxURI& location) 
     175        { 
     176            return m_PDF.CallMethod(wxT("LoadFile"), location.BuildUnescapedURI()).GetBool(); 
     177        } 
     178        virtual bool Load(const wxURI& WXUNUSED(location), 
     179                        const wxURI& WXUNUSED(proxy)) 
     180        { 
     181            return false; 
     182        } 
     183 
     184        virtual wxMediaState GetState() 
     185        { 
     186            return wxMEDIASTATE_STOPPED; 
     187        } 
     188 
     189        virtual bool SetPosition(wxLongLong where) 
     190        { 
     191            m_PDF.CallMethod(wxT("setCurrentPage"), wxVariant((long)where.GetValue())); 
     192            return true; 
     193        } 
     194        virtual wxLongLong GetPosition() 
     195        { 
     196            return 0; 
     197        } 
     198        virtual wxLongLong GetDuration() 
     199        { 
     200            return 0; 
     201        } 
     202 
     203        virtual void Move(int WXUNUSED(x), int WXUNUSED(y), 
     204                        int WXUNUSED(w), int WXUNUSED(h)) 
     205        { 
     206        } 
     207        wxSize GetVideoSize() const 
     208        { 
     209            return wxDefaultSize; 
     210        } 
     211 
     212        virtual double GetPlaybackRate() 
     213        { 
     214            return 0; 
     215        } 
     216        virtual bool SetPlaybackRate(double) 
     217        { 
     218            return false; 
     219        } 
     220 
     221        virtual double GetVolume() 
     222        { 
     223            return 0; 
     224        } 
     225        virtual bool SetVolume(double) 
     226        { 
     227            return false; 
     228        } 
     229 
     230        virtual bool ShowPlayerControls(wxMediaCtrlPlayerControls flags) 
     231        { 
     232            if(flags) 
     233            { 
     234                m_PDF.CallMethod(wxT("setShowToolbar"), true); 
     235                m_PDF.CallMethod(wxT("setShowScrollbars"), true); 
     236            } 
     237            else 
     238            { 
     239                m_PDF.CallMethod(wxT("setShowToolbar"), false); 
     240                m_PDF.CallMethod(wxT("setShowScrollbars"), false); 
     241            } 
     242 
     243            return true; 
     244        } 
     245 
     246        wxActiveXContainer* m_pAX; 
     247        wxAutomationObject m_PDF; 
     248 
     249        DECLARE_DYNAMIC_CLASS(wxPDFMediaBackend) 
     250    }; 
     251 
     252    IMPLEMENT_DYNAMIC_CLASS(wxPDFMediaBackend, wxMediaBackend); 
     253    Put this in one of your existant source files and then create a wxMediaCtrl with 
     254 
     255    //[this] is the parent window, "myfile.pdf" is the PDF file to open 
     256    wxMediaCtrl* mymediactrl = new wxMediaCtrl(this, wxT("myfile.pdf"), wxID_ANY, 
     257                                            wxDefaultPosition, wxSize(300,300), 
     258                                            0, wxT("wxPDFMediaBackend")); 
     259    @endcode 
     260 
    74261 
    75262    @onlyfor{wxmsw} 
    76263 
    77264    @library{wxbase} 
    78     @category{FIXME} 
     265    @category{misc,ipc} 
    79266 
    80267    @see wxActiveXEvent 
     
    87274 
    88275        @param parent 
    89             parent of this control.  Must not be @NULL. 
     276            parent of this control. Must not be @NULL. 
    90277        @param iid 
    91278            COM IID of pUnk to query. Must be a valid interface to an activex control. 
  • wxWidgets/trunk/interface/wx/palette.h

    r55912 r56220  
    4242    /** 
    4343        Copy constructor, uses @ref overview_refcount. 
     44 
     45        @param palette 
     46            A reference to the palette to copy. 
    4447    */ 
    4548    wxPalette(const wxPalette& palette); 
     
    4952        green component. 
    5053 
    51         @param palette 
    52             A pointer or reference to the palette to copy. 
    5354        @param n 
    5455            The number of indices in the palette. 
  • wxWidgets/trunk/interface/wx/popupwin.h

    r54387 r56220  
    2727    */ 
    2828    wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE); 
    29      
     29 
    3030    /** 
    3131      Create method for two-step creation 
    3232    */ 
    3333    bool Create(wxWindow *parent, int flags = wxBORDER_NONE); 
    34      
     34 
    3535    /** 
    3636        Move the popup window to the right position, i.e. such that it is 
    3737        entirely visible. 
    38          
     38 
    3939        The popup is positioned at ptOrigin + size if it opens below and to the 
    4040        right (default), at ptOrigin - sizePopup if it opens above and to the 
    4141        left etc. 
    42          
     42 
    4343        @param ptOrigin 
    4444            Must be given in screen coordinates! 
     45        @param sizePopup 
     46            The size of the popup window 
    4547    */ 
    4648    virtual void Position(const wxPoint& ptOrigin, 
    47                           const wxSize& size); 
     49                          const wxSize& sizePopup); 
    4850}; 
    4951