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

📄 stdpage.h

📁 代码格式化工具。 其实就是linux下indent的windows版本。
💻 H
字号:
#pragma once
#include "macro.h"
extern "C"
{
#include "indent.h"
}
// CStdPage 对话框

class CStdPage : public CPropertyPage
{
	DECLARE_DYNAMIC(CStdPage)

public:
	CStdPage();
	virtual ~CStdPage();

	// 对话框数据
	enum { IDD = IDD_STD };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
	/////////////////////////////////////////////////////////
public:
	check_proc(verbose)
	check_proc(use_tabs)
	check_proc(use_stdout)
	check_proc(c_plus_plus)

	edit_proc(tab_size)
	edit_proc(ind_size)
	edit_proc(max_col)
	edit_proc(else_endif_col)
	edit_proc(comment_max_col)

	check_proc(space_sp_semicolon)
	check_proc(space_after_while)
	check_proc(space_after_if)
	check_proc(space_after_for)
	check_proc(parentheses_space)
	check_proc(proc_calls_space)
	check_proc(leave_preproc_space)
	check_proc(cast_space)
	check_proc(blank_after_sizeof)

	check_proc(star_comment_cont)
	check_proc(format_comments)
	check_proc(format_col1_comments)
	check_proc(comment_delimiter_on_blankline)

	void FillSetting(user_options_ty* ps)
	{
		ASSERT(m_hWnd);
		if (this->m_hWnd)
		{
			ps->verbose = get_verbose();
			ps->use_tabs = get_use_tabs();
			ps->use_stdout = get_use_stdout();
			ps->c_plus_plus = get_c_plus_plus();

			ps->tabsize = get_tab_size();
			ps->ind_size = get_ind_size();
			ps->max_col = get_max_col();
			ps->else_endif_col = get_else_endif_col();
			ps->comment_max_col = get_comment_max_col();

			ps->space_sp_semicolon = get_space_sp_semicolon();
			ps->space_after_while = get_space_after_while();
			ps->space_after_if = get_space_after_if();
			ps->space_after_for = get_space_after_for();
			ps->parentheses_space = get_parentheses_space();
			ps->proc_calls_space = get_proc_calls_space();
			ps->leave_preproc_space = get_leave_preproc_space();
			ps->cast_space = get_cast_space();
			ps->blank_after_sizeof = get_blank_after_sizeof();

			ps->star_comment_cont = get_star_comment_cont();
			ps->format_comments = get_format_comments();
			ps->format_col1_comments = get_format_col1_comments();
			ps->comment_delimiter_on_blankline = get_comment_delimiter_on_blankline();
		}
	}

	void FromSetting(const user_options_ty* ps)
	{
		ASSERT(m_hWnd);
		if (this->m_hWnd)
		{
			set_verbose(ps->verbose);
			set_use_tabs(ps->use_tabs);
			set_use_stdout(ps->use_stdout);
			set_c_plus_plus(ps->c_plus_plus);

			set_tab_size(ps->tabsize);
			set_ind_size(ps->ind_size);
			set_max_col(ps->max_col);
			set_else_endif_col(ps->else_endif_col);
			set_comment_max_col(ps->comment_max_col);

			set_space_sp_semicolon(ps->space_sp_semicolon);
			set_space_after_while(ps->space_after_while);
			set_space_after_if(ps->space_after_if);
			set_space_after_for(ps->space_after_for);
			set_parentheses_space(ps->parentheses_space);
			set_proc_calls_space(ps->proc_calls_space);
			set_leave_preproc_space(ps->leave_preproc_space);
			set_cast_space(ps->cast_space);
			set_blank_after_sizeof(ps->blank_after_sizeof);

			set_star_comment_cont(ps->star_comment_cont);
			set_format_comments(ps->format_comments);
			set_format_col1_comments(ps->format_col1_comments);
			set_comment_delimiter_on_blankline(ps->comment_delimiter_on_blankline);
		}
	}


};

⌨️ 快捷键说明

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