summaryrefslogtreecommitdiffstats
path: root/smenu.h
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2023-03-22 00:29:03 +0100
committerpgen <p.gen.progs@gmail.com>2023-03-22 00:29:03 +0100
commit41050198d30ece7c2e8cb0379428969db271b84d (patch)
tree1fa6e26395e3f74e80851af98b2391b89741501d /smenu.h
parented7866ddd36a1b385a358575756382df9c56c5c4 (diff)
Allow words to be aligned in column mode.
It is also possible to align all the words in a set of columns or rows. Updated options: -C, -R New option: -al|-align Updated manual.
Diffstat (limited to 'smenu.h')
-rw-r--r--smenu.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/smenu.h b/smenu.h
index a758199..164fc1e 100644
--- a/smenu.h
+++ b/smenu.h
@@ -68,6 +68,17 @@ typedef enum filter_types
EXCLUDE_FILTER
} filters_t;
+/* Types of selectors. */
+/* """"""""""""""""""" */
+typedef enum selector_types
+{
+ IN, /* Inclusion. */
+ EX, /* Exclusion. */
+ ALEFT, /* Alignment to the left. */
+ ARIGHT, /* Alignment to the right. */
+ ACENTER /* Alignment to the center. */
+} selector_t;
+
/* Used by the -N -F and -D options. */
/* """"""""""""""""""""""""""""""""" */
typedef enum daccess_modes
@@ -122,6 +133,14 @@ typedef enum bitmap_affinities
START_AFFINITY
} bitmap_affinity_t;
+typedef enum alignment
+{
+ AL_NONE,
+ AL_LEFT,
+ AL_RIGHT,
+ AL_CENTERED
+} alignment_t;
+
/* Used when managing the -C option. */
/* """"""""""""""""""""""""""""""""" */
enum
@@ -594,8 +613,15 @@ void
parse_selectors(char * str, filters_t * filter, char * unparsed,
ll_t ** inc_interval_list, ll_t ** inc_regex_list,
ll_t ** exc_interval_list, ll_t ** exc_regex_list,
- misc_t * misc);
+ ll_t ** al_interval_list, ll_t ** al_regex_list,
+ ll_t ** ar_interval_list, ll_t ** ar_regex_list,
+ ll_t ** ac_interval_list, ll_t ** ac_regex_list,
+ alignment_t * al_default, win_t * win, misc_t * misc);
+void
+parse_al_selectors(char * str, char * unparsed, ll_t ** al_regex_list,
+ ll_t ** ar_regex_list, ll_t ** ac_regex_list,
+ alignment_t * default_alignment, misc_t * misc);
int
replace(char * orig, sed_t * sed);
@@ -654,3 +680,6 @@ is_in_foreground_process_group(void);
long
get_clicked_index(win_t * win, term_t * term, int line_click, int column_click,
int * error);
+
+void
+align_word(word_t * word, alignment_t alignment, size_t prerfix);