defaultmimehandler.h

来自「非常好用的可移植的多平台C/C++源代码编辑器」· C头文件 代码 · 共 56 行

H
56
字号
/***************************************************************
 * Name:      defaultmimehandler.h
 * Purpose:   Code::Blocks plugin
 * Author:    Yiannis An. Mandravellos<mandrav@codeblocks.org>
 * Created:   03/13/05 14:08:51
 * Copyright: (c) Yiannis An. Mandravellos
 * License:   GPL
 **************************************************************/

#ifndef DEFAULTMIMEHANDLER_H
#define DEFAULTMIMEHANDLER_H

#ifdef __WXMSW__
    #if defined(__GNUG__) && !defined(__APPLE__)
        #pragma interface "defaultmimehandler.h"
    #endif
#endif
// For compilers that support precompilation, includes <wx/wx.h>
#include <wx/wxprec.h>

#ifdef __BORLANDC__
	#pragma hdrstop
#endif

#ifndef WX_PRECOMP
	#include <wx/wx.h>
#endif

#include <cbplugin.h> // the base class we 're inheriting
#include <settings.h> // needed to use the Code::Blocks SDK
#include "mimetypesarray.h"

class DefaultMimeHandler : public cbMimePlugin
{
	public:
		DefaultMimeHandler();
		~DefaultMimeHandler();
		int Configure();
        bool HandlesEverything() const { return true; }
		bool CanHandleFile(const wxString& filename) const;
		int OpenFile(const wxString& filename);
		void OnAttach(); // fires when the plugin is attached to the application
		void OnRelease(bool appShutDown); // fires when the plugin is released from the application
	protected:
        cbMimeType* FindMimeTypeFor(const wxString& filename);
        wxString ChooseExternalProgram();
		int DoOpenFile(cbMimeType* mt, const wxString& filename);
        MimeTypesArray m_MimeTypes;
	private:
};

CB_DECLARE_PLUGIN();

#endif // DEFAULTMIMEHANDLER_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?