⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultmimehandler.h

📁 非常好用的可移植的多平台C/C++源代码编辑器
💻 H
字号:
/***************************************************************
 * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -