fmain.h
来自「使用TCppWebBrowser控件实现的浏览器」· C头文件 代码 · 共 239 行
H
239 行
//----------------------------------------------------------------------------
#ifndef fMainH
#define fMainH
#include "ALStatusBar.hpp"
#include "CGAUGES.h"
#include <ActnList.hpp>
#include <AppEvnts.hpp>
#include <Buttons.hpp>
#include <Classes.hpp>
#include <ComCtrls.hpp>
#include <Controls.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include <StdCtrls.hpp>
#include <ToolWin.hpp>
#include "IEAddress.hpp"
//----------------------------------------------------------------------------
class TfmMain : public TForm
{
__published:
TCoolBar *CoolBar1;
TPanel *PanelAddress;
TPanel *PanelGoto;
TToolBar *ToolBarGoto;
TToolButton *ToolButton16;
TPanel *PanelToolBar;
TToolBar *ToolBarMain;
TToolButton *tbBack;
TToolButton *tbForword;
TToolButton *ToolButton8;
TToolButton *ToolButton9;
TToolButton *ToolButton10;
TToolButton *ToolButton11;
TToolButton *ToolButton13;
TToolButton *ToolButton14;
TToolButton *ToolButton15;
TToolButton *ToolButton2;
TMainMenu *MainMenu;
TMenuItem *mFile;
TMenuItem *S1;
TMenuItem *N1;
TMenuItem *U1;
TMenuItem *P1;
TMenuItem *V1;
TMenuItem *N2;
TMenuItem *R1;
TMenuItem *N3;
TMenuItem *C1;
TMenuItem *mEdit;
TMenuItem *ActionEditCut1;
TMenuItem *C2;
TMenuItem *P2;
TMenuItem *N4;
TMenuItem *A1;
TMenuItem *N5;
TMenuItem *F1;
TMenuItem *mView;
TMenuItem *mShowToolbar;
TMenuItem *mShowAddressBar;
TMenuItem *mShowStatusBar;
TMenuItem *N6;
TMenuItem *B1;
TMenuItem *F2;
TMenuItem *S2;
TMenuItem *R2;
TMenuItem *N7;
TMenuItem *C3;
TMenuItem *mFav;
TMenuItem *mAddToFavorite;
TMenuItem *mHelp;
TMenuItem *A3;
TActionList *ActionList1;
TAction *ActionFileSaveAs;
TAction *ActionFilePageSet;
TAction *ActionFilePrint;
TAction *ActionFilePrintReview;
TAction *ActionProp;
TAction *ActionWindowClose;
TAction *ActionEditCut;
TAction *ActionEditCopy;
TAction *ActionEditPaste;
TAction *ActionEditSelectAll;
TAction *ActionFind;
TAction *ActionBack;
TAction *ActionForword;
TAction *ActionStop;
TAction *ActionRefresh;
TAction *ActionViewSource;
TAction *ActionAbout;
TAction *ActionGoHome;
TAction *ActionVisit;
TAction *ActionFullScreen;
TPanel *PanelMainMenu;
TToolBar *ToolBarMainMenu;
TAction *ActionFileCloseAll;
TAction *ActionFileExit;
TMenuItem *L1;
TMenuItem *N9;
TMenuItem *X1;
TALStatusBar *StatusBar1;
TCGauge *ProgressBar1;
TPanel *PanelCloseBrowser;
TSpeedButton *SpeedButtonGo;
TMenuItem *N8;
TAction *ActionFileOpen;
TMenuItem *O1;
TOpenDialog *OpenDialog1;
TMenuItem *N10;
TPanel *PanelURL;
TLabel *LabelAddress;
TAction *ActionInternetOption;
TMenuItem *IEO1;
TAction *ActionEditFarivates;
TMenuItem *M1;
TApplicationEvents *ApplicationEvents1;
TMenuItem *mFontSize;
TMenuItem *N13;
TMenuItem *mLarger;
TMenuItem *mNormal;
TMenuItem *mSmaller;
TMenuItem *mSmallest;
TMenuItem *mLagest;
TPanel *PanelWndCount;
TLabel *LabelWndCount;
TPanel *PanelTab;
TTabControl *TabWindow;
TImageList *ImageList1;
TImageList *ImageList2;
TMenuItem *T1;
TImageList *ImageList3;
TAction *ActionCreateShortcut;
TAction *ActionDeleteShortcut;
TMenuItem *N11;
TMenuItem *S3;
TMenuItem *D1;
TAction *ActionOffline;
TMenuItem *W1;
TAction *ActionGoSearch;
TMenuItem *N12;
TMenuItem *N14;
TMenuItem *S4;
TToolButton *ToolButton1;
TAction *ActionFilePrintDialog;
TToolButton *ToolButton3;
TToolButton *ToolButton5;
TToolButton *ToolButton6;
TIEAddress *ComboBoxAddress;
void __fastcall ActionVisitExecute(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormResize(TObject *Sender);
void __fastcall ActionWindowCloseExecute(TObject *Sender);
void __fastcall ActionFileCloseAllExecute(TObject *Sender);
void __fastcall ActionFileExitExecute(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall ComboBoxAddressKeyUp(TObject *Sender, WORD &Key,
TShiftState Shift);
void __fastcall ActionBackExecute(TObject *Sender);
void __fastcall ActionForwordExecute(TObject *Sender);
void __fastcall ActionRefreshExecute(TObject *Sender);
void __fastcall ActionStopExecute(TObject *Sender);
void __fastcall ActionGoHomeExecute(TObject *Sender);
void __fastcall ActionFilePrintExecute(TObject *Sender);
void __fastcall ActionFilePrintReviewExecute(TObject *Sender);
void __fastcall ActionEditCutExecute(TObject *Sender);
void __fastcall ActionEditCopyExecute(TObject *Sender);
void __fastcall ActionEditPasteExecute(TObject *Sender);
void __fastcall ActionEditSelectAllExecute(TObject *Sender);
void __fastcall ActionFindExecute(TObject *Sender);
void __fastcall ActionFileSaveAsExecute(TObject *Sender);
void __fastcall ActionFilePageSetExecute(TObject *Sender);
void __fastcall ActionPropExecute(TObject *Sender);
void __fastcall ActionFileOpenExecute(TObject *Sender);
void __fastcall ComboBoxAddressClick(TObject *Sender);
void __fastcall mShowToolbarClick(TObject *Sender);
void __fastcall mShowAddressBarClick(TObject *Sender);
void __fastcall mShowStatusBarClick(TObject *Sender);
void __fastcall PanelURLResize(TObject *Sender);
void __fastcall ActionFullScreenExecute(TObject *Sender);
void __fastcall ActionInternetOptionExecute(TObject *Sender);
void __fastcall mAddToFavoriteClick(TObject *Sender);
void __fastcall ActionViewSourceExecute(TObject *Sender);
void __fastcall ActionEditFarivatesExecute(TObject *Sender);
void __fastcall mFavClick(TObject *Sender);
void __fastcall ActionAboutExecute(TObject *Sender);
void __fastcall FormActivate(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall ApplicationEvents1Exception(TObject *Sender,
Exception *E);
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
void __fastcall ApplicationEvents1Message(tagMSG &Msg, bool &Handled);
void __fastcall mFontSizeClick(TObject *Sender);
void __fastcall TabWindowChange(TObject *Sender);
void __fastcall TabWindowMouseMove(TObject *Sender, TShiftState Shift,
int X, int Y);
void __fastcall TabWindowGetImageIndex(TObject *Sender, int TabIndex,
int &ImageIndex);
void __fastcall ActionCreateShortcutExecute(TObject *Sender);
void __fastcall ActionDeleteShortcutExecute(TObject *Sender);
void __fastcall ActionOfflineExecute(TObject *Sender);
void __fastcall ActionGoSearchExecute(TObject *Sender);
void __fastcall ActionFilePrintDialogExecute(TObject *Sender);
private:
bool m_IsCloseAllNow;
void __fastcall WndProc(TMessage &Msg);
void __fastcall OnSystemCommand(TMessage& Msg);
void __fastcall OnMDICreate(TMessage& Msg);
void __fastcall OnMDIDelete(TMessage& Msg);
void __fastcall OnMDIActive(TMessage& Msg);
void __fastcall OnDocumentComplete(TMessage& Msg);
void __fastcall OnBrowserStatusChange(TMessage& Msg);
void GetFavoriesFolder(TMenuItem *ParentMenu,AnsiString Folder,int MaxCount);
void GetFavories(void);
void NavigateURL(const AnsiString &URL,bool AddToURLs);
void CreateBrowserWindow(const String URL);
void CloseAllChild(void);
void SetTabTitle(int Indx,AnsiString Title);
void SetProgress(int MaxVal,int Val);
void OpenByParameter(char *szParameter);
void SetFullScreen(bool full);
TStatusPanel *m_PanelMsg; // 显示消息
TStatusPanel *m_PanelProgress;// 显示当前进度
public:
virtual __fastcall TfmMain(TComponent *Owner);
};
//----------------------------------------------------------------------------
extern TfmMain *fmMain;
//----------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?