mainframe.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2005 Martin Fuchs
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 
00020  //
00021  // ROS Internet Web Browser
00022  //
00023  // mainframe.h
00024  //
00025  // Martin Fuchs, 25.01.2005
00026  //
00027 
00028 
00029 #define PM_OPEN_WINDOW          (WM_APP+0x07)
00030 
00031 
00032  /// Explorer frame window base class
00033 struct MainFrameBase : public PreTranslateWindow
00034 {
00035     typedef PreTranslateWindow super;
00036 
00037     MainFrameBase(HWND hwnd);
00038     ~MainFrameBase();
00039 
00040     static HWND Create(LPCTSTR url, UINT cmdshow=SW_SHOWNORMAL);
00041 
00042     WindowHandle _hwndrebar;
00043 
00044     WindowHandle _htoolbar;
00045     WindowHandle _hstatusbar;
00046 
00047     WindowHandle _haddressedit;
00048 
00049     WindowHandle _hsidebar;
00050     HIMAGELIST  _himl;
00051 
00052     HMENU   _hMenuFrame;
00053     HMENU   _hMenuWindow;
00054 
00055     MenuInfo _menu_info;
00056 
00057 protected:
00058     FullScreenParameters _fullscreen;
00059 
00060     HACCEL  _hAccel;
00061 
00062     LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
00063     bool    ProcessMessage(UINT nmsg, WPARAM wparam, LPARAM lparam, LRESULT* pres);
00064     int     Command(int id, int code);
00065     int     Notify(int id, NMHDR* pnmh);
00066 
00067     virtual BOOL TranslateMsg(MSG* pmsg);
00068 
00069     void    toggle_child(HWND hwnd, UINT cmd, HWND hchild, int band_idx=-1);
00070 
00071     void    resize_frame_client();
00072     virtual void resize_frame(int cx, int cy);
00073     virtual void frame_get_clientspace(PRECT prect);
00074 
00075     BOOL    toggle_fullscreen();
00076     void    fullscreen_move();
00077 
00078     void    FillBookmarks();
00079     virtual bool go_to(LPCTSTR url, bool new_window) {return false;}
00080 };
00081 
00082 
00083 struct MainFrame : public MainFrameBase
00084 {
00085     typedef MainFrameBase super;
00086 
00087     MainFrame(HWND hwnd);
00088 
00089     static HWND Create();
00090     //@@static HWND Create(LPCTSTR url);
00091 
00092 protected:
00093     WindowHandle _left_hwnd;
00094     WindowHandle _right_hwnd;
00095 
00096     int     _split_pos;
00097     int     _last_split;
00098     RECT    _clnt_rect;
00099 
00100     String  _url;
00101 
00102     LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
00103     int     Command(int id, int code);
00104 
00105     void    resize_frame(int cx, int cy);
00106     void    resize_children();
00107     void    update_clnt_rect();
00108 
00109     void    set_url(LPCTSTR url);
00110 
00111     virtual bool go_to(LPCTSTR url, bool new_window);
00112 };
00113 
00114 
00115 struct WebChildWndInfo : public ChildWndInfo
00116 {
00117     WebChildWndInfo(HWND hwndFrame, LPCTSTR url)
00118      :  ChildWndInfo(hwndFrame),
00119         _url(url)
00120     {
00121     }
00122 
00123     String  _url;
00124 };
00125 

IBrowser Source Code Documentation
generated on 18.09.2008 by doxygen

Homepage