[Bf-blender-cvs] [7c5838cfd66] master: Cleanup: use doxy sections for text operators

Campbell Barton noreply at git.blender.org
Thu Aug 1 11:28:32 CEST 2019


Commit: 7c5838cfd66a656e3ad422ddbe0f23b31dcff1e3
Author: Campbell Barton
Date:   Thu Aug 1 19:27:25 2019 +1000
Branches: master
https://developer.blender.org/rB7c5838cfd66a656e3ad422ddbe0f23b31dcff1e3

Cleanup: use doxy sections for text operators

===================================================================

M	source/blender/editors/space_text/text_ops.c

===================================================================

diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 8f7bd83cbf4..0c180dc150c 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -61,7 +61,9 @@
 
 static void txt_screen_clamp(SpaceText *st, ARegion *ar);
 
-/************************ util ***************************/
+/* -------------------------------------------------------------------- */
+/** \name Util
+ * \{ */
 
 /**
  * Tests if the given character represents a start of a new line or the
@@ -138,14 +140,18 @@ static char *buf_tabs_to_spaces(const char *in_buf, const int tab_size)
   return out_buf;
 }
 
-/************************ poll ***************************/
-
 BLI_INLINE int text_pixel_x_to_column(SpaceText *st, const int x)
 {
   /* add half the char width so mouse cursor selection is inbetween letters */
   return (x + (st->cwidth / 2)) / st->cwidth;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Operator Poll
+ * \{ */
+
 static bool text_new_poll(bContext *UNUSED(C))
 {
   return 1;
@@ -206,7 +212,11 @@ static bool text_region_edit_poll(bContext *C)
   return 1;
 }
 
-/********************** updates *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Updates
+ * \{ */
 
 void text_update_line_edited(TextLine *line)
 {
@@ -230,7 +240,11 @@ void text_update_edited(Text *text)
   }
 }
 
-/******************* new operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name New Operator
+ * \{ */
 
 static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -281,7 +295,11 @@ void TEXT_OT_new(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* open operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Open Operator
+ * \{ */
 
 static void text_open_init(bContext *C, wmOperator *op)
 {
@@ -392,7 +410,11 @@ void TEXT_OT_open(wmOperatorType *ot)
       ot->srna, "internal", 0, "Make internal", "Make text file internal after loading");
 }
 
-/******************* reload operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Reload Operator
+ * \{ */
 
 static int text_reload_exec(bContext *C, wmOperator *op)
 {
@@ -443,7 +465,11 @@ void TEXT_OT_reload(wmOperatorType *ot)
   ot->poll = text_edit_poll;
 }
 
-/******************* delete operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Delete Operator
+ * \{ */
 
 static bool text_unlink_poll(bContext *C)
 {
@@ -495,7 +521,11 @@ void TEXT_OT_unlink(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* make internal operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Make Internal Operator
+ * \{ */
 
 static int text_make_internal_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -529,7 +559,11 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* save operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Save Operator
+ * \{ */
 
 static bool text_save_poll(bContext *C)
 {
@@ -614,7 +648,11 @@ void TEXT_OT_save(wmOperatorType *ot)
   ot->poll = text_save_poll;
 }
 
-/******************* save as operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Save As Operator
+ * \{ */
 
 static int text_save_as_exec(bContext *C, wmOperator *op)
 {
@@ -690,7 +728,11 @@ void TEXT_OT_save_as(wmOperatorType *ot)
                                  FILE_SORT_ALPHA);  // XXX TODO, relative_path
 }
 
-/******************* run script operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Run Script Operator
+ * \{ */
 
 static bool text_run_script_poll(bContext *C)
 {
@@ -765,7 +807,11 @@ void TEXT_OT_run_script(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-/******************* refresh pyconstraints operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Refresh Pyconstraints Operator
+ * \{ */
 
 static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
 {
@@ -825,7 +871,11 @@ void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
   ot->poll = text_edit_poll;
 }
 
-/******************* paste operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Paste Operator
+ * \{ */
 
 static int text_paste_exec(bContext *C, wmOperator *op)
 {
@@ -889,7 +939,11 @@ void TEXT_OT_paste(wmOperatorType *ot)
                   "Paste text selected elsewhere rather than copied (X11 only)");
 }
 
-/**************** duplicate operator *******************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Duplicate Operator
+ * \{ */
 
 static int text_duplicate_line_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -924,7 +978,11 @@ void TEXT_OT_duplicate_line(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* copy operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Copy Operator
+ * \{ */
 
 static void txt_copy_clipboard(Text *text)
 {
@@ -963,7 +1021,11 @@ void TEXT_OT_copy(wmOperatorType *ot)
   ot->poll = text_edit_poll;
 }
 
-/******************* cut operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Cut Operator
+ * \{ */
 
 static int text_cut_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1002,7 +1064,11 @@ void TEXT_OT_cut(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* indent operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Indent Operator
+ * \{ */
 
 static int text_indent_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1043,7 +1109,11 @@ void TEXT_OT_indent(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* unindent operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Unindent Operator
+ * \{ */
 
 static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1079,7 +1149,11 @@ void TEXT_OT_unindent(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* line break operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Line Break Operator
+ * \{ */
 
 static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1132,7 +1206,11 @@ void TEXT_OT_line_break(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* comment operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Comment Operator
+ * \{ */
 
 static int text_comment_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1170,7 +1248,11 @@ void TEXT_OT_comment(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* uncomment operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Uncomment Operator
+ * \{ */
 
 static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1209,7 +1291,11 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
   ot->flag = OPTYPE_UNDO;
 }
 
-/******************* convert whitespace operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Convert Whitespace Operator
+ * \{ */
 
 enum { TO_SPACES, TO_TABS };
 static const EnumPropertyItem whitespace_type_items[] = {
@@ -1360,7 +1446,11 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
                "Type of whitespace to convert to");
 }
 
-/******************* select all operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Select All Operator
+ * \{ */
 
 static int text_select_all_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1386,7 +1476,11 @@ void TEXT_OT_select_all(wmOperatorType *ot)
   ot->poll = text_edit_poll;
 }
 
-/******************* select line operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Select Line Operator
+ * \{ */
 
 static int text_select_line_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1412,7 +1506,11 @@ void TEXT_OT_select_line(wmOperatorType *ot)
   ot->poll = text_edit_poll;
 }
 
-/******************* select word operator *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Select Word Operator
+ * \{ */
 
 static int text_select_word_exec(bContext *C, wmOperator *UNUSED(op))
 {
@@ -1441,7 +1539,11 @@ void TEXT_OT_select_word(wmOperatorType *ot)
   ot->poll = text_edit_poll;
 }
 
-/********************* move lines operators ***********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Move Lines Operators
+ * \{ */
 
 static int move_lines_exec(bContext *C, wmOperator *op)
 {
@@ -1487,7 +1589,11 @@ void TEXT_OT_move_lines(wmOperatorType *ot)
   RNA_def_enum(ot->srna, "direction", direction_items, 1, "Direction", "");
 }
 
-/************************ move operator ************************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Move Operator
+ * \{ */
 
 static const EnumPro

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list